Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in JAVA : for this assignment we will be generating signatures and validating signatures using our ssh keys. we will be using RSA keys to

in JAVA :

for this assignment we will be generating signatures and validating signatures using our ssh keys. we will be using RSA keys to do the signing and validation.

you will want to use test ssh keys for RSA:

ssh-keygen -t rsa -f rsa_test

be sure to generate keys that aren't password protected!

you need to implement the following class: (please don't change the package name, class name, or method signatures)

NOTE: when generating signatures with RSA use "SHA256withRSA" .

public class BlobSigner { /** * generate a signature file (dstSignatureFile) for fileToSign using * sshPrivateKeyFile. * * * * * * @param fileToSign the file containing the data to be signed. * @param sshPrivateKeyFile the ssh private key file with the signing key * to use. * @param dstSignatureFile the file to write the generated signature to. * the signature will be base64 encoded. */ public static void signFile( File fileToSign, File sshPrivateKeyFile, File dstSignatureFile ) {}

/** * validate the signature file (signatureFile) corresponding to * signedFile using the public key in sshPublicKeyFile. * @param signedFile the file containing the data that was signed. * @param sshPublicKeyFile the file containing the public key corresponds * to the private key that was used to sign * signedFile. * @param signatureFile the base64 encoded signature generated with the * private key that corresponds to sshPublicKeyFile * over the data in the signedFile. * @return true if the signature is valid. */

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

=+Who should be recruited?

Answered: 1 week ago