Questions tagged [session-keys]

18 questions
5
votes
1 answer

Who generates HTTPS session keys?

Some sources says that the web browser generates the session key. Now if the web browser generates it then its vulnerable for replay attacks. Also some sources says that the server generates a part of it and the rest the client generates. How does…
user574183
  • 710
  • 1
  • 10
  • 22
4
votes
1 answer

Unable to decrypt an unarmored pgp file with OpenPGP.js: Session key decryption failed

I have a CSV file that has been encrypted and is now an unarmored PGP file. I'm trying to decrypt it using OpenPGP.js 5.0.0 and Node.js 14.17.5 but keep hitting a wall. At first, I tried the following code, as per the project examples: const…
noamt
  • 7,397
  • 2
  • 37
  • 59
2
votes
1 answer

OpenPGP.js - Getting an error: "Error decrypting message: Session key decryption failed."

Here is some of the code using openpgp.js: const privKeyObj = (await openpgp.key.readArmored(privkey)).keys[0]; await privKeyObj.decrypt(passphrase); options = { message: await openpgp.message.readArmored(encryptedData), privateKeys:…
jocca
  • 21
  • 1
  • 3
1
vote
1 answer

Getting / Setting session key in Django Unit Tests

I'm saving the session_key to an object to associate data to anonymous users. In Unit Tests, I'm trying to use the Test Client to set a fixed key, but the key changes during a POST request. An example: // tests.py def test_post(self): …
wasabigeek
  • 2,923
  • 1
  • 21
  • 30
1
vote
0 answers

Encrypting a byte [ ] using a AES 256 Session key

I have a Session key which is Changing with every execution of the program. I have to encrypt a byte[ ] using that session key (AES 256) so how to do that. I am generating my key by Key key; SecureRandom rand = new…
Mudit
  • 199
  • 2
  • 21
0
votes
1 answer

In R cyphr, how can I encrypt (symmetric) a string or file, save the ws, reload it and then decrypt the file or string, as simply as possible?

I'm just learning to use cyphr and doing a very simply exercise, but having a problem that involves session keys. I want to encrypt a file and then, at some later date & time, decrypt, but I ran into the problem below. I'm the only one who will be…
0
votes
0 answers

How to create session key on behalf or public key identifier

I got this description for SKey block in documentation for generating XML request Element: Skey (mandatory): Value of this element is base-64 encoded value of encrypted 256-bit AES session key. Session key must be dynamically generated for every…
0
votes
0 answers

How to generate a session for APIs in Taobao

I am using this API: alibaba.icbu.open.product.post in the test interface of the Taobao, but they are asking for a Sessionkey, how to get the session? I tried App authorization but I think its asking me to "sign in" in Taobao site. do I need a…
0
votes
0 answers

How to set padding for signed key encryption in java?

// cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding"); public byte[] sign_and_encrypt( SecretKey key ) throws InvalidKeyException, IllegalBlockSizeException, BadPaddingException { cipher.init(Cipher.WRAP_MODE, priv_key); byte []…
0
votes
0 answers

When is the Django session key generated in a Django application?

When is the Django session key generated in a Django web application? More precisely I don't use Django authentication system. I use an external system. I check whether a session id is present for authentication of new tab. If already exist,…
0
votes
0 answers

Is there a library in erlang for X9.63 Key Derivation Function

Can somebody please tell me whether there is a library in Erlang for X9.63 Key Derivation Function. I need to generate the keyData and the Session Keys.
anonymous
  • 57
  • 7
0
votes
0 answers

Extract session key from encrypted message (envelope)

I have a hard time to extract session key (symmetric key) from encrypted message envelope (Bouncy Castle encrypted). I have read that documentation where states only that with a field of the type EncryptedKey representing the bytes making up the…
JackTheKnife
  • 3,795
  • 8
  • 57
  • 117
0
votes
1 answer

Encrypting Xml using session key

I have a Xml which is stored in the String. I need to encrypt it using a session key (AES and 256bit). I am using following code to generate the key: public byte[] generateSessionKey() throws NoSuchAlgorithmException, NoSuchProviderException { …
Mudit
  • 199
  • 2
  • 21
0
votes
1 answer

Issue in generating session key

I amusing following code to generate sessionkeu public byte[] generateSessionKey() throws NoSuchAlgorithmException, NoSuchProviderException { KeyGenerator kgen = KeyGenerator.getInstance("AES","BC"); kgen.init(256); …
Mudit
  • 199
  • 2
  • 21
0
votes
3 answers

getByte() is returning same byte[ ] for different Strings

I am generating a Session key, that changes every time i run the program. But when i am converting it into BYTE ARRAY then Byte Array generated is same every time i run the program . IT should be different right? Here is my code Key…
Mudit
  • 199
  • 2
  • 21
1
2