-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AMCL JS ECDSA Key data structure and signing procedure #19
Comments
Or is it possible to store the generated key pair into the CryptoKeyPair object from the JS web crypto API [1]? Pascal [1] https://developer.mozilla.org/en-US/docs/Web/API/CryptoKey |
In general I like to keep public and secret keys separate from one another. The public key can always be generated from the secret key if needed. |
Ok. Do you maybe know, if it is possible to import the created key from the library into the CryptoKeyPair/CryptoKey to use the standardized methods for signatures? Or is it possible to do the same behavior as in java (below) with this library? Signature sig = Signature.getInstance("SHA256withECDSA");
sig.initSign(privateKey);
for(byte[] bytes : message) {
sig.update(bytes);
}
return sig.sign(); The method ECDH.ECPSP_DSA(sha, rng ,privateKey,message,CS, DS); I get the signature in form of List<byte[]> message Thank you in advance! EDIT: |
Have I only to convert the
or is there something more to do? I am not sure, but it seems to me that the Java Signature object gives a byte array back, which are in DER format. [1] https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm#Signature_generation_algorithm |
I am sure it is possible, it seems just a case of transforming the signature from one format to another, but I'm afraid I don't have the time to look into it right now... |
Ok, thank you anyway! |
Hi,
in my example I want to create a key pair for ECDSA from a given byte seed and was searching for a data structure which holds the key pair and the keys in the library.
I am not sure, but it seems that it don't exist such a data structure right?
Should it not exist is it possible to add a data structure for it like for the RSA keys in rsa.js?
I was thinking about an object like KeyPair (Java) or something similar.
Thank you in advance!
Pascal
The text was updated successfully, but these errors were encountered: