Questions tagged [rsa-sha256]

56 questions
0
votes
1 answer

How do I create the padded message for use in the SHA256-2 algorithm?

I am trying to understand the SHA-2 algorithm. And it seems that its a bit vague on how people are encoding the message 'L' (see wikipedia's SHA256-2 pseudo code). Is the message encoded in ASCII, UTF-8, or UTF-16? I understand that technically…
Dan Krueger
  • 457
  • 4
  • 10
0
votes
0 answers

How to Sign a String using RSA Private Key Android Kotlin

We are facing issue on Signing String using Private RSA Key val key:'-----BEGIN RSA PRIVATE KEY-----ASDSADSAADSDASA-----END RSA PRIVATE KEY-----'; val data:'DATA TO BE SIGNED'; val privateKeyPEM = key .replace("-----BEGIN RSA PRIVATE…
Kashyap Patel
  • 1,139
  • 1
  • 13
  • 29
0
votes
1 answer

Validating RS256 signature with PHP

I am having trouble verifying an RS256 signature in PHP from a JWT. I have $to_verify = substr(Cookie::get('CF_Authorization'), 0, strrpos(Cookie::get('CF_Authorization'), ".")); $signature = base64_decode(explode('.',…
php-ryan
  • 1
  • 1
0
votes
1 answer

Problems to write a byte array of a signed hash with a private key in a text file and get it back as the same format

I'm writing a bytes array to a text file of a signed hash, that I first convert to a base64 string and convert to a bytes array again with the encoding UTF-8 before writing to the text file, my current problem is that when I get the bytes back I…
Rudy Silva
  • 13
  • 2
0
votes
1 answer

Convert String in Hash SHA-256 format with NUL(e.g. "/000")

Using JMETER, I would like to convert below String in SHA - 256 Hash key notation 624111NUL2021-10-06T11:35:39-04:00NULs3cr3tNUL, The correct supposed to be 7c3f952cdd1d6bf56a2762c5bb94add00883654794d27344f1dd55e5901f381c while using below hash…
Narendra
  • 1
  • 1
0
votes
1 answer

Generate JSON Web Token (RS256) to access DocuSign using Google Apps Script

I am trying to send envelopes from Docusign using only Apps Script. function createJWT(){ const header = { alg: 'RS256', typ: 'JWT', }; const now = Date.now(); const expires = new Date(now); expires.setHours(expires.getHours() +…
0
votes
1 answer

OpenSSL RSA_sign C++ - Different sign than the command line

I am trying to develop a Digital Signature tool using OpenSSL's libs but the created sign from my code is different than the one I get from the command line. I checked and validated that the SHA256 digest is correct. This is an example of the…
Eleni Ioakim
  • 53
  • 1
  • 7
0
votes
1 answer

RSA-SHA256 Signature mismatches

I'm working on an implementation of EWP (Erasmus Without Papers), a set of API's for communication between universities world wide. Every call must be signed with RSA-SHA256. Every partner has a private and public key, the public keys are available…
Joep Demey
  • 93
  • 2
  • 8
0
votes
1 answer

Verify RSA-SHA256 xml in PHP (Signing in .NET and Verifying in PHP)

I Receive XML request, contains MsgBody Tag, and Signature (the signing process done in .net), I have to Verify the msg body they sent, with the signature, and the requester public key, but i cant. my code is : $msg_body =…
Mohamed Alfar
  • 23
  • 1
  • 6
0
votes
1 answer

C# code needed for RSA-SHA256 decryption with public key

I need help to implement EWP (https://developers.erasmuswithoutpaper.eu/). I have set up some API's and use an online validator tool by EWP to test them. Everything is working now, except for 1 thing: the signature verification. I have a few methods…
Joep Demey
  • 93
  • 2
  • 8
0
votes
1 answer

Can't verify signed data with public key C#

I have an application that needs to sign certain data and then confirm that the signature is valid. The algorithm to use is RSA SHA 256. I have a certificate with its respective private key in the Windows certificate store. I have searched in…
0
votes
1 answer

Equivalent SecurityAlgorithmSuite in .Net Core

I am migrating a project from .Net framework 4.8 to .Net Core 3.1. The problem is that this Basic256 algorithm is not compatible with Net Core SecurityAlgorithmSuite.Basic256Sha256Rsa15 Do you know any equivalent libraries?
0
votes
0 answers

java and auth0: Token signature invalid exception

I'm trying to varify a jwt in java, I have used similar code to this post: Java - Auth0 JWT Verification - Is this correct? public void parseJWTKey(HttpHeaders header) { try { Jwk jwk = getPublicKey(); //method to…
Boots
  • 43
  • 2
  • 9
0
votes
1 answer

Is there a way to create hash(sha256) for images in Yocto's swupdate layer?

My objective is, To create sha256 for all the required files(which go into .swu) To Sign sw-description file with RSA algorithm. My .swu consists: kernel Image - bzImage rootfile system - panther2-usb-panther2.ext4 software description file -…
Raxesh Oriya
  • 383
  • 6
  • 27
0
votes
0 answers

Java. Cannot import SHA256withRSA signature from import java.security.Signature

I'm trying to initialize SHA256withRSA Signature object: Signature signer = Signature.getInstance("SHA256withRSA"); But compiler generates NoSuchAlgorithmException, but when I run this code: import java.security.Signature; public static void…