Data Encryption using PyNaCl

Hello contributors,

We are using python (Django) for blackened, trying to use PyNaCl for mutual authentication.
We came to know this package from data_encrypt_decrypt.

We followed the Public Key Encryption — PyNaCl 1.6.0.dev1 documentation

While receiving the public key and nonce from HIU, the size of the public key and nonce is incompatible for HIP (our platform), The default public key accepted by pynacl is 32 bytes, but the key we are receiving from HIU is 88 characters.

It would be a great help if any integrator shares some ideas to resolve the problem.

Regards
Aman Patel

2 Likes

Hey Aman,

Apologies for the delay in response.
The sample provided here - https://sandbox.abdm.gov.in/docs/data_encrypt_decrypt
were developed by us using Java and we do not have expertise in Python.
Kindly see if you can use this - https://gist.github.com/Nexengineer/b53d2535ce247b82f1a3bd289728efdd

@amanneo
Have you completed this python encryption?

@amanneo @akashkrish Checking if you implemented this in python ?

@IntegrationSupport : Can you please respond to this query as we are also struggling to do it on python ?

1 Like

@ashishkyogi We do not have any resource for the same.