FAQ Database Discussion Community


Loading raw 64-byte long ECDSA public key in Java

java,cryptography,digital-signature,public-key,ecdsa
I have a raw (r,s) format ECDSA NIST P-256 public key. It seems that there is no simple way to load it into an object that implements java.security.interfaces.ECPublicKey. What is the cleanest way to load a 64 byte public key so that it can be used to check signatures?...

Encode publicKey on Java Card

java,encoding,javacard,ecdsa,pkcs#8
How to encode an ECDSA PublicKey on Java Card so that after I can decode it on another platform (e.g. sending the encoded key in a response APDU and processing it in a standard Java application)? keyPair.getPublic().getEncoded() on Java would do the trick with PKCS#8 encoding, but as far as...

Segmentation fault when signing a message using OpenSSL, SWIG, and Perl

c,perl,openssl,swig,ecdsa
We were using SWIG to make a C cryptographic utility library available to Perl. We are able to generate keys, create digests, but the signing code causes a segmentation fault, which we believe may be in the OpenSSL code itself but it's difficult to be sure. This problem only comes...

Error when verifying ECDSA signature in Java with BouncyCastle

java,bouncycastle,signature,ecdsa
I have tested a solution to verify an ECDSA signature (How can I get a PublicKey object from EC public key bytes?) that works perfect with the given data. This is the data: byte[] pubKey = DatatypeConverter.parseHexBinary("049a55ad1e210cd113457ccd3465b930c9e7ade5e760ef64b63142dad43a308ed08e2d85632e8ff0322d3c7fda14409eafdc4c5b8ee0882fe885c92e3789c36a7a"); byte[] message =...

Converting byte array to publickey ECDSA

java,key,signature,public-key,ecdsa
I need to use ECDSA algorithm to sign a message and send to receiver in java. Then, receiver should verify sender's signature. So, for this, receiver has sender's public key but in byte array format after converting java.security.PublicKey to byte array by the command bellow: byte[] byteArrayPublicKey = publickey.getEncoded(); The...

Sending signature data in response APDU - Java Card

digital-signature,smartcard,javacard,apdu,ecdsa
I would like to sign some data (the MESSAGE byte array) on my Java Card and then return the signature in a response APDU. My code works fine (or at least I think it does and it returns 9000) without the line apdu.sendBytes(BAS, sSignLen), but when I uncomment it I...

How many number of primitive operations does a 16, 32 or a 64-bit processor execute to perform logical right shift of an N-bit Binary number? [closed]

algorithm,cryptography,bit-shift,polynomial-math,ecdsa
Recently,I have been trying to understand how the Binary Extended Euclidean Algorithm works at the processor level. This question is all about finding an Inverse element in GF(2^m) with polynomial basis. Generally I came across the Extended Euclidean Algorithm for evaluating an inverse element but the fact is that it...