VERY URGENT: Format of public data in the KeyAgreement.generateSecret() method
Posted: Thu Jul 21, 2016 9:18 am
Dear Friends,
Greetings.
I have been working on implementing the PSO:DECIPHER feature using the ECC algorithm.
As part of this, I have been using the method:
public abstract short generateSecret(byte[] publicData, short publicOffset, short publicLength, byte[] secret, short secretOffset) throws CryptoException
I am formatting the public data with all the tags like 0x81, 0x82, 0x83, 0x84, 0x85 and 0x87 which are P, A, B, G(x,y), N fields respectively.
In addition to the above tags, I am passing another tag 0x86 which contains the public portion of the key (this is the data I receive in the PSO:Decipher command data field which is in the format 0x04||X||Y, X and Y are the coordinates of the public key point on the curve).
With this data sent to the above mentioned method (generateSecret), I am getting 0x6985 status word.
So I felt that the public data part (argument 1 of the method which is constructed using the aforementioned tags) is not compatible to the method.
In this regard, could any one tell me what should be the exact format of the public data that should be sent to the method so that it generates a shared secret?
FYI, I am using the BrainPoolsecp192r curve at present for the above operation.
Thank you a lot if I get any expert answer ASAP.
Have a nice day everybody.
Greetings.
I have been working on implementing the PSO:DECIPHER feature using the ECC algorithm.
As part of this, I have been using the method:
public abstract short generateSecret(byte[] publicData, short publicOffset, short publicLength, byte[] secret, short secretOffset) throws CryptoException
I am formatting the public data with all the tags like 0x81, 0x82, 0x83, 0x84, 0x85 and 0x87 which are P, A, B, G(x,y), N fields respectively.
In addition to the above tags, I am passing another tag 0x86 which contains the public portion of the key (this is the data I receive in the PSO:Decipher command data field which is in the format 0x04||X||Y, X and Y are the coordinates of the public key point on the curve).
With this data sent to the above mentioned method (generateSecret), I am getting 0x6985 status word.
So I felt that the public data part (argument 1 of the method which is constructed using the aforementioned tags) is not compatible to the method.
In this regard, could any one tell me what should be the exact format of the public data that should be sent to the method so that it generates a shared secret?
FYI, I am using the BrainPoolsecp192r curve at present for the above operation.
Thank you a lot if I get any expert answer ASAP.
Have a nice day everybody.