6,963 questions
0
votes
0
answers
26
views
Dart SecurityContext not accepting programmatically generated RSA private key for Android TV Remote Protocol
I'm building a Flutter app that uses Android TV Remote Protocol v2. The app requires client certificates for authentication. When I use a manually created certificate (placed in assets), everything ...
0
votes
1
answer
129
views
rsa.ImportFromPem(privateKeyString) throws strange error in ASP.NET Core 6.0 Web API [closed]
using (RSA rsa = RSA.Create())
{
rsa.ImportFromPem(privateKeyString);
byte[] dataToSign = Encoding.UTF8.GetBytes(signData);
byte[] signedData = rsa.SignData(dataToSign, HashAlgorithmName....
0
votes
0
answers
61
views
How to securely connect Flutter to a Node.js server with TLS or RSA encryption?
I'm building a Flutter app that needs to send user data (like name and street) to a Node.js backend server. Currently, the data is sent via URL like this:
http://192.168.1.126:8080/save?name=toto&...
0
votes
0
answers
97
views
How to extract private part of RSA key from Azure Key Vault?
I'm using Java & Spring Boot for an endpoint which sole purpose is to create, sign and issue JWT. The library used for creating JWTs is java-jwt. I have a problem creating a com.auth0.jwt....
0
votes
0
answers
88
views
Cybersource microform upgrade from V0.4 to V2 -Validation of the Context key with the public key is getting failed
Here is the class that am using ,based on the flow that I have ,the validation always fails and return false in the line boolean isValid = signature.verify(signatureBytes);
LOG.info("Signature ...
0
votes
0
answers
82
views
RSA with nodejs and flutter Error during decryption (probably incorrect key). Original error: Error: error:02000079:rsa routines::oaep decoding error
I am experimenting with developing rsa with flutter and nodejs. public.pem and private.pem are same for both. Both the code are working fine when run in same language. but when transmitting data over ...
0
votes
0
answers
52
views
Input format for public key in EU command on payShield 10K
I'm working with a Thales payShield 10K and trying to use the EU command to translate a public key under new LMK.
I currently have the key available in PEM, DER, and HEX formats. However, according to ...
1
vote
1
answer
87
views
Can't align RSA encryption in Python and Kotlin
I would like to add RSA encryption in my server (Python FastAPI) and my Android app.
But the encryption didn't work as the way I expected.
I already have AES-GCM encryption/decryption working between ...
0
votes
0
answers
99
views
Which Should I Choose: SHA256withRSA or SHA512withRSA for Android App Keystore?
I'm in the process of generating a keystore for signing my Android app, and I'm wondering about the best choice for the signature algorithm. My current command is as follows:
KeyTool.exe -genkey -v ^
-...
0
votes
2
answers
126
views
RSA encryption and decryption for special characters (àâäèéêë)
I am using Angular to encrypt the payload with publickey
publicKey: string = `-----BEGIN PUBLIC KEY-----
-----END PUBLIC KEY-----`;
let encryptedCredential = {};
const rsa = Forge.pki....
0
votes
3
answers
443
views
How to verify the signature of a PSS (Probabilistic Signature Scheme) signed signature in C# (Tillo webhooks)
I'm working on an integration with Tillo, using signed webhooks as described here.
Tillo provide example code for signature validation in Python and PHP. However, I need an implementation in C# and so ...
6
votes
1
answer
207
views
C# to Python RSA implement
Just trying to rewrite this c# code to python.
Server send public key(modulus, exponent), need to encrypt it with pkcs1 padding.
using (TcpClient client = new TcpClient())
{
await client....
2
votes
1
answer
842
views
python snowflake.connector & rsa private_key_file issue
I meet an issue when trying to use snowflake.connector with an RSA pkcs8 key with passphrase.
When I try this code, with this kind of RSA Key:
openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -...
2
votes
0
answers
112
views
Encrypt RSA/ECB/OAEPWithSHA-256AndMGF1Padding Swift Padding error
Backend gives us publicKey and we need to encrypt with
RSA/ECB/OAEPWithSHA-256AndMGF1Padding
and send it to server.
I am using this functions :
static func encrypt(string: String, publicKey: String?)...
0
votes
0
answers
91
views
Cannot extract public key from ASN Object
So I am trying to parse a der format file to extract the public key. I have three algos, RSA, EDDSA and ECDSA. The below code works for RSA but not for EDDSA and ECDSA. I am getting the below error
...
0
votes
0
answers
280
views
How do I use windows ncrypt API NCryptExportKey function, to get an unencrypted certificate key, in C/C++
I want to give access to a personnel certificate to another process, in PEM format. The process uses openssl.
I successfully export the cert to a blob...but something is wrong.
NCRYPT_KEY_HANDLE ...
0
votes
0
answers
190
views
Translate .NET 6 to .NET 4.8 ImportRSAPrivateKey in C# does not exist
I am trying to translate this C# .NET 6.0 code to run on .NET 4.8. I am trying to get a token using a RSA private key pem file. But I didn't succeed.
Please, can someone help me ?
I have a problem ...
0
votes
1
answer
313
views
Azure key vault certificate throws bad parameter error
When I upload the certificate as this:
-----BEGIN CERTIFICATE-----
{my certificate}
-----END CERTIFICATE-----
-----BEGIN PRIVATE KEY-----
{my key}
-----END PRIVATE KEY-----
I am getting the error:
...
1
vote
1
answer
128
views
How to do RSA Encryption in Python using PyCryptodome
I am new to the world of encryption and I was wondering if my solution for encrypting/decrypting data is okay.
When creating this, I referenced the API documentation from PyCryptodome: https://...
0
votes
1
answer
236
views
AEADBadTagException: mac check in GCM failed during AES decryption with BouncyCastle
I am encountering a javax.crypto.AEADBadTagException: mac check in GCM failed error when attempting to decrypt data using AES in GCM mode with BouncyCastle. The error occurs during the AES decryption ...
0
votes
1
answer
115
views
how to resolve exception while reading private key from file [closed]
i am trying to read private key from a file using the below code and getting an exception. is there any way to resolve it?
generatePrivate() method throws invalidkeyspecexception.
import java.nio....
0
votes
1
answer
186
views
'Encrypted message length is invalid.' using node-forge to decrypt the message encrypted from jsencrypt
currently using jsencrypt and node-forge for decrypt and encrypt the message using RSA, while jsencrypt is used in frontend and node-forge in backend.
import { JSEncrypt } from 'jsencrypt'
import * as ...
3
votes
0
answers
151
views
Understanding issues with TPM and TSS.NET
I did a lot of research, but I still have some issues with concept of the TPM and his handling with keys.
First at all, the task is to create a RSA-Key for encryption.
We want to use this later for ...
-2
votes
1
answer
177
views
How can encrypt\encode (Base64) for a generated key including message with 2nd public data key in OpenPGP medium? [closed]
I'm using Kleopatra after installed Gpg4win. I have generated an RSA key pair with a 1024-bit key size, using my name as the username using Windows Command Prompt. I was suppose to genearte and sign ...
0
votes
1
answer
115
views
Digital Signature of Hash (HMACSHA256) in Java using SHA256 algorithm & Pkcs1 RSA signature padding didn't match with dot net implementation
I am trying to create digital signature of the hash (created using HMACSHA256) in Java using SHA256 algorithm & Pkcs1 RSA signature padding but it is not producing the same signature as ...