CRYPTO NEWS

Does the ECDSA private or public keys contain data about the signature hash algorithm?

šŸ™‚ Hello

  1. I was wondering if the signature hash algorithm was a part of the private key or just the signing process?

  2. Should a signature instance depend on the private key? (Of course, still talking about ECDSA)

  3. If I don’t sha256 my data before calling a signature instance SHA256withECDSA. Does this have the same effect as sha256 my data before calling a signature instance NONEwithECDSA?

  4. All these questions to know if these two pieces of Java code are equivalent:

PrivateKey privateKey = pk;
byte[] dataToSign = data;
Signature signature = Signature.getInstance("SHA256withECDSA");
signature.initSign(privateKey);
byte[] signedData = signature.update(dataToSign);
PrivateKey privateKey = pk;
byte[] dataToSign = SHA256(data);
Signature signature = Signature.getInstance("NONEwithECDSA");
signature.initSign(privateKey);
byte[] signedData = signature.update(dataToSign);

Thank you

Does the ECDSA private or public keys contain data about the signature hash algorithm?

Shopping cart
There are no products in the cart!
Continue shopping
0