15,242 questions
Best practices
1
vote
3
replies
67
views
Should I change RSA algorithm to some more modern algorithm or just stay on RSA but use larger key length?
I tried use 6144 bits RSA key, but this has been taking so much time as around of 5 - 7 seconds to generate key pair, I think it's too long. On the other side, using keys with less length may become ...
1
vote
0
answers
31
views
Trouble decrypting CiphertextForRecipient after KMS GenerateDataKey
I'm building a route for my go (gin) server that generates a Data Encryption Key (DEK), following the principle of zero-trust (the backend never sees the plaintext).
Right now, the client generates a ...
0
votes
0
answers
58
views
C# TSS Interacting with the TPM
public static AESTPMKey OpenOrCreateAesRootKey()
{
const uint persistentHandleValue = 0x81000001;
var persistentHandle = new TpmHandle(persistentHandleValue);
// 1️⃣ Connect to TPM
...
Advice
0
votes
0
replies
69
views
How should I encrypt my email service so only the allowed clients are able to call it
I have an email microservice that I created.
I have a platform deployed for multiple tenants. Example; clienta.platform.com, clientb.platform.com etc etc.
Now I want to secure the email micro-service ...
0
votes
0
answers
96
views
Is key recovery possible for this 4-round 64-bit SPN cipher given 65k known plaintext-ciphertext pairs? [closed]
Given this specific cipher design and known-plaintext corpus, is there a cryptanalytic or structural weakness that enables key recovery or decryption faster than brute force?
The setup is:
There’s a ...
15
votes
3
answers
2k
views
Why would one reset local variables at the end of a C function?
Take a look at the function SHA1Transform taken from an SHA1 algorithm on Github. Assuming SHA1HANDSOFF is defined, the function looks like this:
void SHA1Transform(
uint32_t state[5],
const ...
1
vote
1
answer
113
views
`pepk.jar` fails with `javax.crypto.BadPaddingException` preventing Play App Signing enrollment for existing app
Title: pepk.jar fails with javax.crypto.BadPaddingException preventing Play App Signing enrollment for existing app
Problem Statement:
We are trying to enroll an existing Android app (com.clsreview....
Advice
0
votes
0
replies
88
views
Design review: ntfy-based remote unlock for Vaultwarden without exposing .env passphrase on a compromised host?
(If you want to skip to the part I ask the question, scroll down to the last section with the heading "Concrete question".)
I’m working on a home lab / learning project and would appreciate ...
2
votes
1
answer
144
views
The operation failed for an operation-specific reason: Cipher job failed
I have the following code that should encrypt a string with a password in nodeJS. You can find an example here: https://jsfiddle.net/ujr4gev3/1/
I have also tried the approach here: https://gist....
2
votes
1
answer
235
views
Upgrading PHP scripts to use phpseclib3 versus phpseclib version 2
I am trying to upgrade my phpseclib-based scripts to the latest, which is version 3. (Previously, I was using version 2.) I have run into a number of problems, beginning with the fact that class ...
2
votes
2
answers
166
views
Storing biometric data in a PDF without breaking the digital signature
I'm developing a tool that stores a signer's biometric data inside a PDF together with the digital signature, but I'm unsure where this information should be embedded.
The biometric data is captured ...
Advice
0
votes
1
replies
107
views
What are other alternatives for python keyring?
I'm trying to find a secure way to store token for my cli application. In the app I take the token from ms entra id and I want to store this token in user computer so that user can use it again until ...
0
votes
1
answer
159
views
Calculating DigestValue of SignedProperties in XAdES
I am trying to create an application to sign xml documents in xades format by using PKCS11Interop library. I have a xades sign application provided by a government institute to test my results. I am ...
1
vote
1
answer
163
views
Migrating from OpenSSL 1.1 to 3.0: How to generate DH key pair with 32-byte prime using EVP_PKEY-DH interface?
I'm migrating my Diffie-Hellman (DH) implementation from OpenSSL 1.1 to OpenSSL 3.0. Previously, I used APIs like DH_set0_pqg, but these are now deprecated. I am switching to the EVP_PKEY-DH interface ...
1
vote
0
answers
146
views
Why does EVP_PKEY_derive_set_peer cause a segmentation fault when using a peer public key reconstructed from BIGNUM in OpenSSL 3?
I'm using OpenSSL 3.0 EVP_PKEY in C to perform Diffie-Hellman key exchange. I generate Alice's and Bob's key pairs. I extract Bob's public key as a BIGNUM and try to reconstruct an EVP_PKEY for Bob's ...