Sahamati/rahasya

Key Material Discrepancies with ReBIT Spec

rajesha-onemoney opened this issue · 8 comments

hi sasikumar,
i am using the ecc service v1.2 API's via docker. i am able to encrypt the data. while decryption getting below error.
"mac check in GCM failed". actaully we are consuming ecc API's in my nodejs application. i am unable to understand this java based error. please help me solve this.

Envoronment Details:
OS: Linux
Lang: Node JS

error response:
{
errorCode: 'javax.crypto.AEADBadTagException',
errorMessage: 'mac check in GCM failed',
errorInfo: null
}

GCM failed means the data used during encryption and the data after decryption are not matching.

https://www.cryptosys.net/pki/manpki/pki_aesgcmauthencryption.html

@rajesha-onemoney Today we done a new docker release you can get the same using the below pull command.

docker pull gsasikumar/forwardsecrecy:latest

In this build we have taken care of above discrepancy item 1.

Can you give us more details on discrepancy item 2, since as per V1.1, V1.2 and latest build DHPublicKey/Parameter is same as the Rebit spec 1.1.3

Discrepancy item 3 we have still have to fix and I feel this is a valid ask.

@gsasikumar Please confirm so I can work on this fix.

hi @vishwa-vyom ,
please refer below screen shots for discrepancy item 2.
check keynames of "DHPublicKey" in both images. one is Rebit spec and one is our ecc-service
Screenshot from 2020-08-17 11-20-20
Screenshot from 2020-08-17 11-23-41

@rajesha-onemoney I am current working on the discrepancy item 3, will update back once done..
Also there is pull request for item 2, so once my changes are done will speak to Sasi to merge both and do one more docker release.

sure @vishwa-vyom , thanks for the update

As this issue is resolved I am closing this issue.