Questions tagged [public-key-encryption]
An cryptographic scheme which uses two mathematically related keys; a public and a private key where a message encrypted with public key can only be decrypted with the private key and vice-versa.
1,847
questions
0
votes
0
answers
53
views
How to generate RSA PKCS5 keypair in Javascript?
I need to create a set of RSA keys (public+private) on the client (javascript), send it to the server (Ruby) that uses those keys to encrypt data, which is sent to a mobile device which needs to ...
0
votes
0
answers
26
views
When did RSA public key exchange occur?
Hi I'm new to encryption thing and start learning about asymmetric encryption, especially RSA.
I already know that the RSA requires both/more parties to generate the public key and private key and ...
0
votes
0
answers
20
views
SQL Server 2019: failed to decrypt column
I have restored a database in SQL Server 2019 Dev edition. The .bak file was created from a SQL Server 2017 database on a different machine.
I get this error:
Failed to decrypt column 'EmployeeSalary'...
-2
votes
0
answers
46
views
Why doesn't python work correctly with really big numbers (encryption)?
I am writing code that takes in a message, encrypts it using a public key, then decrypts it using a private key. When I use a message like "Lorem ipsum dolor sit amet." It works great. But ...
0
votes
0
answers
39
views
Public key crypto function in Google sheets [closed]
In Google sheets, is there a way to:
encrypt values in selected cells in a row with a private key and store the encrypted value in another cell in the same row, and
decrypt the encrypted value using ...
0
votes
0
answers
11
views
SM2 algorithm, the length of public key encryption is inconsistent with the expectation
The public key encrypts a 48Char data, and the result is arranged according to the format of C1C3C2.
C1
(randomly generating a point on the elliptic curve of SM2) and two BigInteger numbers of 32byte ...
-1
votes
0
answers
37
views
Generate PublicKey from Base64 String in Swift and Encrypt / Decrypt with RSA
I'm trying to generate an RSA Encryption/Decryption for an Android/iOS application, I already have the public key that I'll use to do both methods in a Base64 encrypted string and I have everything ...
0
votes
1
answer
34
views
What is the key scheme and encoding used in GUN?
What are the key schemes, sizes, and encodings used in GUN db?
I didn't find a quick answer on searching so am adding the question here.
The keys look like:
let lee = await SEA.pair()
>lee.pub
&...
0
votes
1
answer
31
views
Can't use PHPMailer to sign with S/MIME, getting "Signing Error: "
I'm using phpmailer to try to send signed emails (S/MIME).
I used this
excellent tutorial by John Dalesandro
to create a Self-Signed S/MIME Certificate and package it in PKCS12 Format.
I then followed ...
-1
votes
0
answers
67
views
showing Input byte array has wrong 4-byte ending unit
I have two functions to encrypt or decrypt passwords. but After encrypting password i am trying to decrypt it but it showing an error java.lang.IllegalArgumentException: Input byte array has wrong 4-...
0
votes
0
answers
10
views
Print the values of torch tensor in created by pysyft paillier encryption
I am trying to get the actual encrypted values from the encrypted tensor. How can I get the values, it prints the object.
0
votes
1
answer
33
views
Create PEM certificate from Java PublicKey created with Nimbus
I have an integration where I validate a JSON created by another service. They provide a public endpoint to fetch the public certificates to validate against.
But I am setting up a test for this and ...
0
votes
1
answer
34
views
Convert binary key to ASN1(PEM) format
Given a private key; generate a keyfile that contains both the private and public keys.
Given a public key; generate a keyfile that contains only the public key.
for example if the prime256v1 private ...
0
votes
0
answers
20
views
SSL, socket connection and public key encryption
I am trying to authenticate as a client side with a server www.example.com. I have the following code so far which is fetching me the public certificate of the website programmatically:
from ...
1
vote
2
answers
52
views
Is there any way to encrypt a string which is more than 255 characters using azure keyvault
We are using key from key vault to encrypt a token. The token includes user id. For some of the users, the length is big. so encryption is failing as it supports only 255 characters. Is there any way ...
0
votes
0
answers
29
views
TSS.NET RsaEncrypt producing different cipher text when using the same handle
I am following the Authorisation program on TSS.MSR Github, and I am stuck probably with understanding TMP as a whole.
snippet from the repo:
static void AutomaticAuth(Tpm2 tpm)
{
...
1
vote
1
answer
51
views
Why does Stripe not use public-key cryptography for signing webhooks?
From the docs:
Stripe can optionally sign the webhook events it sends to your endpoints by including a signature in each event’s Stripe-Signature header. This allows you to verify that the events ...
1
vote
1
answer
53
views
Convert Google KMS signatures from DER-encoded format to .Net IEEE 1363 format
I would like to convert signature in DER-encoded format (which I get from google KMS service) to IEEE 1363 format using C# (in order to validate the signature)
How it is done in C#, .Net Core 5 ?
0
votes
0
answers
54
views
Client seems to hang after a specific reply from server
I am implementing an authentication process between a server and a client in order to exchange some information. I have created a function called serverToClientAuth on both server and client that ...
0
votes
2
answers
102
views
RSA Encrypted data convert from bytes to string and back to bytes?
I am trying to implement a Symmetric-key agreement scheme using public-key cryptography between multiple clients via socket communication and I have been testing the encryption and decryption ...
0
votes
0
answers
48
views
Where to store an rsa key pair
I am building a React.JS application that is supposed to encrypt and decrypt data.
I'm using the subtlecrypto api to create RSA key pairs. I want to store them, preferably in the browser, in a way the ...
0
votes
0
answers
22
views
Verifying SSL Certificate on Server Can sign for Website Domain
Looking at ways to verify SSL certificate in origin serve: address: 67.222.39.77 can sign for the website integrationtest.xyz. I've managed to find all the certificates info seen below. My ask is how ...
0
votes
0
answers
22
views
Using the TLS Channel ID(OBC) in your web apps
How can we actually implement the usage of TLS Channel ID in our web apps for signing things or even using it in way that server side encrypts something for the client side using public key of OBC (...
0
votes
1
answer
36
views
Displaying Decrypted Data on a Webpage, without the Webpage Being able to read or save it
I'm trying to solve the following problem:
The user has a public-private keypair. The public key is known, while the private key is kept secret by the user.
The webserver has data that was encrypted ...
0
votes
2
answers
245
views
Convert bytes to string or store as bytes python
I'm trying to encrypt string with python by RSA but the encrypted string returns as bytes
I'm trying to find a way either to convert bytes to string and store it in db or store it as bytes as it is ...
0
votes
0
answers
65
views
GnuPG encryption using public key in .net C#
Fairly new to the c#/.net ecosystem.
My file needs to be pgp encrypted, I have used didisoft lib. like as below.
using DidiSoft.Pgp;
pgp.EncryptStream(inputBlob,name,
...
0
votes
0
answers
65
views
What does the term "marked for encryption" mean in the context of public key encryption?
We're trying to troubleshoot a situation where some files sent to us can be successfully decrypted on the command line using GPG but not in a GUI program that interfaces with that library. The error ...
0
votes
0
answers
31
views
how to config a multiline pam public key variable in laravel dotenv file? [duplicate]
I have tried below methods, but neither works.
this will set the PUBLIC_KEY with incomplete value <<<EOD
PUBLIC_KEY=<<<EOD
-----BEGIN PUBLIC KEY-----
MIIBIjANB...
-----END PUBLIC ...
0
votes
0
answers
98
views
How to extract the x and y affine coordinates from a ECC public key (PEM format) without private key?
I don't have visibility of the private key since I use HSM. I have the public key in PEM format, is possible to derive the ECC-256 public part, i.e. the x and y affine coordinates?
0
votes
0
answers
33
views
How to use the cryptosuite API for encryption in hyperledger fabric?
I am trying to find an algorithm that will help encrypt data using the public key and decrypt using the private key in the smart contract. Cryptosuite is supposed to help achieve that but I can't find ...
0
votes
1
answer
106
views
To encrypt string with public key using RSA algorithm - invalid key format exception in Java
I'm trying to encrypt string using RSA with public Key in java. facing exception like "java.security.InvalidKeyException: invalid key format"
Partial Public key :
-----BEGIN PUBLIC KEY-----
...
0
votes
0
answers
109
views
How do you load an ed25519 key string into nodejs?
I can generate a key with crypto.generateKeyPairSync()
But how do I go about loading it from a string/file?
1
vote
0
answers
39
views
How to encrypt a message while maintaining confidentiality and integrity?
I will demonstrate my question with an example.
I want to develop a distributed application for renting cars. Since the booking details (BD) can be visible on the blockchain, I want to encrypt them ...
2
votes
1
answer
332
views
How to verify JWT produced by Azure Ad?
Problem
When I receive a JWK from Azure AD in Python, I would like to validate and decode it. I, however, keep getting the error "Signature verification failed".
My Setup
I have the ...
0
votes
0
answers
41
views
R Shiny: Encrypting dataframe on server
I have a Shiny application that allows users to upload some data and I would like to encrypt it for storage on the server using a public key while keeping the private key for decryption on a different ...
1
vote
1
answer
83
views
Is there a reason this is wrong?
#include <iostream>
#include <bits/stdc++.h>
#include <numeric>
using namespace std;
int
gcd (int a, int b)
{
if (a == 0)
return b;
return gcd (b % a, a);
}
int
phi (...
0
votes
1
answer
85
views
generate public key from pk8 file
I have a pk8 file with private key (ecc256) , I need to get the public key.
I tried to look over the web, and i found some openssl forums discussing pem files
I didnt find about pk8
0
votes
0
answers
39
views
Are Google Recaptcha site keys and secret keys mathematically linked?
I'm looking at my site & secret keys for my recaptcha account and they are both 40 characters long. The first 13 characters of both are exactly the same.
My question is are these keys ...
0
votes
1
answer
228
views
mbedtls: How to transfer and load public key as raw bytes
I want to use a public/private key pair (ECDSA using secp256r1 curve) to sign commands sent to an embedded device via BLE, and verify them on the device. This means sending the public key to the ...
0
votes
0
answers
167
views
no new() in sha3::Keccak256 struct
I'm trying to get an ethereum public address from a hex private key.
I wrote a rust script for that -
extern crate hex;
extern crate secp256k1;
extern crate sha3;
use secp256k1::{PublicKey, SecretKey}...
0
votes
1
answer
18
views
Want to receive argument from user and put them on function
I want to get arguments from user and use them in function, but the types are different.
Note: a comment is there in bottom of code that is correctly work
but I want to get arguments directly
Thanks ...
1
vote
1
answer
331
views
How to set PKCS1 v1.5 padding to RSA in Dart?
I want to encrypt the value with public key, I used pointycastle package and RSA and PKCS1 v1.5 padding, but this didn't work.
publicKey: 7/ZVKLxKXsQnlVUozywoumbFGbSz8kbH178dT165ODd/a/...
0
votes
1
answer
154
views
OpenPGP.js says elgamal keys are considered too weak
We are using PGP encryption to encrypt files before transfer. We are using the npm package OpenPGP.js to encrypt the files using a public key from the recipient. I have exported the public key in ...
1
vote
0
answers
284
views
Implementing signal protocol with Node server and react using @privacyresearch/libsignal-protocol-typescript
So I'm implementing simple client-server application using Node and React using typescript.
I'm using @privacyresearch/libsignal-protocol-typescript npm library to implement e2e encryption between ...
0
votes
1
answer
74
views
Removing entries from GPG Keyservers
I've been using GPG for a few years and my entry at the various directories, such as the Ubuntu's keyserver, is now pretty messy:
uid Andy McCall (Andy McCall's PGP Key) <andy.mccall@xxx.xxx>
...
0
votes
0
answers
98
views
Unable to figure out the encoding/encryption used
I am new to backend service and I was tracing API calls from a banking website. Normally, I have seen parameters in POST requests being encoded with base64 encoding. However, I came across a type of ...
0
votes
1
answer
131
views
how sign correctly xml python using signxml?
Hi everybody i'm trying create and sign xml from json data.
I retrieve my object as json from this i create the xml with my xsd file.
when i sign at the output file i can't see (this is empty on my ...
0
votes
0
answers
31
views
Can cryptographical algorithms be based on a problem that is np-hard (and potentially not np)?
From what I understand, P problems are problems that can be solved in polynomial time; NP problems are problems that can be verified in polynomial times but not necessarily solved in polynomial times. ...
0
votes
1
answer
31
views
Can we abort a transaction in blockchain?
Due to security advantages through chaining of blocks and public key encryption, Is it possible to implement a transaction abort in blockchains?
1
vote
2
answers
127
views
What is difference between AWS IAM access key and AWS Instance key file (.pem)?
Is the AWS Instance key file(.pem) higher level than the AWS IAM access key ?