Ask Your Question
1

What prevents an individual from replacing a signed or unsigned JAR with their own?

asked 2023-05-30 14:17:02 +0000

nofretete gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-05-30 14:20:01 +0000

devzero gravatar image

There are several measures put in place to prevent an individual from replacing a signed or unsigned JAR with their own:

  1. Digital signatures: JAR files are typically signed with a digital signature, which is a mathematical algorithm that ensures the integrity of the file. The signature is created by the file creator using their private key, and it can be verified using their public key. If someone tries to modify the contents of the JAR file, the signature will no longer match, and the file will be detected as compromised.

  2. Trust stores: When a JAR file is signed, it is typically signed by a trusted certificate authority (CA). This means that the digital signature can be verified using the CA's public key, which is stored in a trust store on the user's system. If the CA is not trusted, the JAR file will not be allowed to run.

  3. Hash values: Hash values are used to ensure the integrity of JAR files. A hash value is a unique identifier that is generated using a mathematical algorithm, and it is based on the contents of the file. If someone tries to modify the contents of the JAR file, the hash value will change, and the file will be detected as compromised.

  4. Permissions: JAR files can only access resources that they have been granted permission to access. This means that even if someone manages to replace a JAR file, they will not be able to access resources that the original file was not granted permission to access.

Overall, these measures make it very difficult for an individual to replace a signed or unsigned JAR file with their own. However, it is still important to be vigilant and use caution when downloading and running JAR files from the internet.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-30 14:17:02 +0000

Seen: 11 times

Last updated: May 30 '23