trying to convert Java RSA-PSS signature verification code (with SHA256 hash, SHA1 MGF hash) to Python

Here’s my Java code, which successfully verifies the signature, as expected. Signature sig = Signature.getInstance(“RSASSA-PSS”); PSSParameterSpec pssParams = new PSSParameterSpec( “…

Is there any stable serialization method for different languages?

In my project we have an API, and many clients may send transactions to this API. Transactions should be signed. Clients may be written in any language (C++, C#, python, go, whatever), with any CPU …

Fixed length 64 Bytes EC P-256 Signature with JCE

I need a fixed length 64 Byte ECDSA signature with the NIST P-256 Curve. The implementation hast to use JCE. The following code sample can generate a signature and verify it. Provider provSign = …

For PBKDF2, using HMAC-SHA256 is more secure than using HMAC-SHA-1?

I’m looking for the proper Java algorithm for password encryption, and I found that Java SDK provides PBKDF2WithHmacSHA1, but not PBKDF2WithHmacSHA256. I heard that HMAC-SHA256 will take more time …

Extract raw certificate from PKCS#7 file in JAVA

I would like to achieve the same what this openssl command performs, but programmatically in Java: openssl pkcs7 -in toBeExported.p7c -inform DER -out certificate.pem -print_certs which means that …

Java 256-bit AES Password-Based Encryption

I need to implement 256 bit AES encryption, but all the examples I have found online use a “KeyGenerator” to generate a 256 bit key, but I would like to use my own passkey. How can I create my own key?…