1,644 questions
-4
votes
0
answers
65
views
How to design a privacy-preserving user identity system without exposing client/backend details? Should I use hashing or random tokens? [closed]
I’m working on a project where privacy is extremely important for both the client and the backend.
Neither side should expose any sensitive or identifying information.
A senior developer suggested ...
0
votes
0
answers
82
views
Android instrumented tests stopped working, after uninstalling Bouncy Castle and an EncryptedSharedPrefs fork, now a Bouncy Castle key error
I have stopped being able to run instrumented tests on Android Studio. They were working fine for weeks. But now even the simplest instrumented test will result in this error, in Build Output:
:app:...
0
votes
1
answer
69
views
With rust_pki_types, reading private key from file throws Error::NoItemsFound
Problem
I am attempting to create an HTTPS server using TLS certificates using rustls_pki_types. I am attempting to read from files the server's certificate chain and the server's own private key with ...
0
votes
1
answer
140
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
162
views
Windows 11: private key not usable when protected vbs + high security (password)
I have a C# program (running on .NET 8) that signs data using an RSA key that is stored in Windows cert-/keystore. The key had been imported using Windows certmgr.msc into the "Personal" ...
1
vote
1
answer
292
views
How to use TPM2 key with password protection in OpenSSL (handle-based key)
I'm working on a project where I generate a TPM-protected private key using tpm2-pytss in Python, and then try to use that key in OpenSSL to generate a certificate.
However, I face an issue when the ...
1
vote
0
answers
177
views
Get private key from certificate received from LocalMachine store - the CNG key handle being opened was detected to be ephemeral
This code returns private key in .NET 4.8, but throws an exception in .NET 8.0:
var store = new X509Store(StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadOnly);
var certificates = store....
1
vote
1
answer
778
views
TonKeeper generates different Wallet Address even though Same Mnemonics was used
I noticed that Tonkeeper somehow generates different Wallet Address(be it v4, v5, v3 etc) even though it is the same Mnemonics that was used.
The below is my code in Javascript to generate the Wallet ...
0
votes
0
answers
122
views
Where to store private key of RSA encryption
I am developing an ASP.NET Core Web API and want to use JWT (JSON Web Tokens) for authentication. I want to sign the tokens using RSA encryption. The API should be deployable on both Linux and Windows ...
1
vote
1
answer
120
views
Interfacing TPM 2.0 Infinenon SLB9673 with OPC-UA server (Python)
Context:
We developed a PCB integrating several sensors and a system on module (SoM) using Torizon (a Linux distribution), one of the roles of this PCB is to host an OPC-UA server.
We also included an ...
0
votes
1
answer
125
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
0
answers
1k
views
Snowflake DB Key-Pair Implementation Issue in C#
I am working on Snowflake Database Key-Pair implementation (migrating from user_id & password to Key-Pair) in .net Framework 4.8. I have installed Snowflake data connector version 4.0. I have ...
0
votes
0
answers
135
views
How to Validate Passphrase with Private Key in PHP?
I'm working on validating a passphrase for a private key in PHP. My goal is to confirm whether the provided passphrase is correct for a given private key. Here's the basic approach I’m trying, but I ...
1
vote
0
answers
125
views
Finding associated private key for a SSL/TLS certificate using powershell
When importing a new certificate (.pfx with password) on a windows server (2022) with .net framework 4.8 using Powershell from a remote device, the problem of addings users that can manage the private ...
0
votes
1
answer
274
views
Trying to connect Power Automate to Amazon Web Service is returning this error "Details: Server HMAC algorithm not found "
I have this SFTP-SSH action inside Power Automate, where I am trying to connect to Amazon Web Service using those details:
Private key using RSA
FingerPrint
USerName
EndPoint URL
As follow:-
But ...
1
vote
1
answer
461
views
ERR_OSSL_UNSUPPORTED using octokit in vercel deployment
I use nuxt (nitro as backend) and have an error in one of my endpoints which is the callback endpoint for a github app installation. In that endpoint I just import user data into our database.
I don't ...
1
vote
0
answers
182
views
Failed to get public key using PEM_read_bio_PUBKEY()
I was testing loading public key and failed.
At first, I create a private key and public key using openssl as follow.
$ openssl genrsa -out test-priv.pem 4096
$ openssl req -subj '/C=US/ST=Texas/L=...
0
votes
0
answers
394
views
Configuring Apache 2.4 on Windows for HTTPS with a passphrase-protected key file
As per the title, I'm trying to configure Apache 2.4 on a Windows server (Win 2022) to support HTTPS connections. The CA signing service I'm using provided me a CRT and KEY file in PEM (Base64) ...
1
vote
1
answer
343
views
Generate a pkcs8 key suitable for ECDSA private key import using subtlecrypto
I need to generate a deterministic set ECDSA keys using zero dependencies javascript, for which I produce a pkcs8 key out of raw bytes and then import it as ECDSA private key. Is this logically ...
0
votes
1
answer
91
views
JWT: to sign the claims with public key or private key, which way to go?
I am looking into sign JWT token with secret key (pem).
I did some investigation and it seems JWT is suppose to utilize private key to sign the claim.
What if can I sign the JWT claims with public key ...
1
vote
0
answers
56
views
How to link or associate the certificate in apple keychian with associated private key generated in secure enclave?
I have generated the keypair using secure enclave with (SecKeyCreateRandomKey()) , then created csr and then certificate is issued by CA. I have stored the certificate in keychain with (SecItemAdd()). ...
1
vote
0
answers
166
views
PowerShell - Unable to sign a JWT with a Private Key - There's no private key in the supplied certificate - cannot sign
Apologies but I am very new to Powershell however I have a few basic API integrations setup that I need to move from basic auth to OAUTH (JWT).
I am trying to create a JWT and an RSA Certificate and ...
0
votes
1
answer
223
views
Trouble importing RSA-PSS key in NodeJS using subtle.importKey
I'm trying to import a private key to sign an XML file in NodeJS.
To sign the XML, I'm using xmldsigjs which requires the key to be passed in a CryptoKey object that is obtained by crypto.subtle....
1
vote
1
answer
411
views
Error: no client jwks provided for signing a client assertion with Zitadel and openid-client
I am using Zitadel as an Identity Provider, and created there a project and an API with a key. I now want to obtain a M2M token through the “JWT bearer token with private key” method, which is the ...
0
votes
1
answer
552
views
How to access private key of a passkey on the client?
I am building an app with sveltekit and I have decided to implement passkeys as a form of authentication.
So, I started researching about them and found out that in their foundation is the concept of ...
1
vote
0
answers
254
views
Issue with Airflow Variables Adding Extra Backslashes to Private Key
I'm encountering a peculiar issue with Airflow. I've stored a private key as a variable in Airflow, but it seems to be adding an extra backslash (\) to newline characters (\n).
Here's an example of ...
0
votes
1
answer
615
views
CryptAcquireCertificatePrivateKey() fails with error CRYPT_E_NO_KEY_PROPERTY
This is the setup
AD CS (windows server 2019 Hyper-V VM)
Created a new template by duplicating smartcard logon template.
Changed provider to Microsoft Software Key Storage Provider.
Algorithm is RSA ...
-2
votes
1
answer
109
views
Encrypt my own message and its giving a different message [closed]
So I'm trying to encrypt my own message but its coming out in symbols instead of letters.
Here is my code below
while b != 0:
a, b = b, a % b
return a
s0, s1 = 1, 0
t0, t1 = 0,...
0
votes
1
answer
547
views
Ruby's Net::SSH is limited to 3 authentication tries while OpenSSH client is not
I'm having a really weird problem where when I connect to an SSH server (that has a pretty standard default configuration, including a default MaxAuthTries of 6) using Net::SSH, the connection fails ...
0
votes
0
answers
266
views
Converting a PKCS8 PEM Private key to a RSAParameter in C#
I have a key in the format
-----BEGIN PRIVATE KEY-----
-----END PRIVATE KEY-----
I want to convert it to an RSA key to create a JWT from it. I'm using .NET 3.5 Framework.
But when I Use this code
...
0
votes
0
answers
352
views
github actions cannot push workflow
In a new Github repo I have added a workflow file. I can edit that file in the online editor.
But when I clone the repo, change the workflow and then try to push, I am getting:
$ LANG=C git push ...
2
votes
1
answer
354
views
how to create CSR in PHP?
I am trying to create CSR using PHP and OpenSSL extension,
but when I do that it gives me an error which says:
Failed to generate private key: error:2006D080:BIO
routines:BIO_new_file:no such file
...
0
votes
0
answers
51
views
How do I find my Path to add into .env file on github when making an APP
I'm not at all sure how to add my Private keys path into the .env file in GitHub.
I managed to download a private-key.pem to my PC but have no idea how I get the path to add into it.
PRIVATE_KEY_PATH=&...
1
vote
1
answer
941
views
How to sign a data using ECDSA private key with the P-256 (secp256k1) curve in Android Kotlin?
I wanted to sign a hex data using ECDSA private key with the P-256 (secp256k1) curve. But most of the methods in Android use PKCS#8 encoded private key for signature generation. How to convert an ...
0
votes
0
answers
210
views
TypeError: Cannot read properties of undefined (reading 'randomPrivateKey') in ethereum-cryptography/secp256k1 module
When attempting to call the randomPrivateKey function from the 'secp256k1' module, I have an issue that is preventing me from generating a private key.
const secp = require("ethereum-cryptography/...
0
votes
1
answer
201
views
Get X509Certificate2 Private Key without Export as CngKey
I'm using the ncrypt.dll in order to create a hash using both MD5 + SHA1 for DTLS like this:
private static class NCryptInterop
{
private struct BCRYPT_PKCS1_PADDING_INFO
{
internal ...
0
votes
2
answers
1k
views
Java 21: Generate encrypted private RSA key in PEM format
I'd like to generate an RSA key pair in Java 21 using plain Java API (without using BouncyCastle or similar libraries). The private key should be processable by both OpenSSL and Java. Based on Java ...
0
votes
1
answer
2k
views
Invalid header encountered while PGP verifying signature
My requirement:
Hash Algorithm during signing: SHA256
Sender signs the encrypted message using its private key
Receiver verifies the signature using Sender’s public key
I am having the below ...
0
votes
1
answer
364
views
How can I include my google cloud storage private key in my Nextjs app hosted on Vercel?
I'm trying to use Google Cloud Storage to upload image files in my Nextjs website. Everything works fine in development, but as soon as I deploy to Vercel, it's saying that there is no private key. I ...
-1
votes
2
answers
567
views
How do I decrypt an encrypted rsa 2048 encoded string?
I have a requirement to replace my non-encrypted RSA private key with an encrypted one.
I used
openssl ... -newkey rsa:2048 -new sha256 ...
(Omitted non-essential stuff)
to generate the pem. I see ...
0
votes
0
answers
136
views
Correct way to add PRIVATE_KEY in Glitch .env?
I'm following this document to add PRIVATE_KEY in, https://glitch.com/, in this documentation they mentioned like this,
Click on the file ".env" on the left sidebar, then click on ✏️ Plain ...
0
votes
0
answers
53
views
Invalid SCA token in unix
I am trying to generate a JWT and sign it with node private key. Private key is in txt format.
token_header=echo -n '{"alg":"RS256","typ":"JWT"}' | base64 | sed ...
1
vote
0
answers
173
views
xml signing with google-cloud-kms in java/kotlin
I don't understand how I would use the built in xml signing library in java with google kms. I have my pub/private key in google kms.
I do the following without google kms:
val keyPair = getKeyPair() /...
1
vote
1
answer
868
views
SignTool - unexpected internal error - Could not associate private key with certificate
I just received my code signing eToken (the little USB dongle) for my EV code signing certificate, and I'm trying to use it to sign my code. In Windows Powershell (running as Administrator), I'm ...
1
vote
1
answer
134
views
Cannot convert PrivateKey to String
I want to convert an private key to an String so that user can store it in hard state .
i tried to convert the private key using Base64 but it gives me error stating privateKey.getEncoded() is null
...
2
votes
1
answer
1k
views
How to check whether age public key and private key couple with each other
Age is a practical toos for file encryption, here it is its presentation page: age.
With age-keygen, we are going to be able to create a couple of public key and private key together like below:
# ...
0
votes
1
answer
1k
views
How to use Base64-encoded DER format in DBT profiles.yml
I'm trying to configure DBT to connect to Snowflake database using a private key in Base64-encoded DER format. The documentation mentions this format, but I'm not sure how to create the key or include ...
0
votes
1
answer
3k
views
Azure key vault certificate import cannot handle BEGIN RSA PRIVATE KEY
I am trying to import a certificate.pem file to an azure key vault in the certificate section, that looks like this:
-----BEGIN RSA PRIVATE KEY-----
{my key}
-----END RSA PRIVATE KEY-----
-----BEGIN ...
1
vote
0
answers
349
views
Can't convert #pkc1 pgp private/public key to #pkc8
openSSL pkcs8 -in private-key.pem -topk8 -nocrypt -out private-pkc8.pk8
I run this command and it prompts;
"Could not find private key of key from private-key.pem"
I can't seem to find a ...
0
votes
1
answer
606
views
Why isn't my .PEM key in Key Vault correctly being used in my Function App?
I am trying to complete a process using Python via an Azure Function App. This process takes a private key (.PEM, which has been uploaded to Azure Key Vault as a Key) as well as two secrets (our API ...