Questions tagged [jwe]

JWE specifies how to encrypt content and encode associated metadata. It is defined in RFC 7516: JSON Web Encryption (JWE).

Filter by
Sorted by
Tagged with
0 votes
0 answers
49 views

JSON Web Encryption (JWE) Key Wrapping Fundamentals - How To Encrypt Content Encryption Key?

The JSON Web Encryption RFC 7516 says: Encrypt the CEK with the recipient's public key using the RSAES-PKCS1-v1_5 [or RSAES-OAEP] algorithm to produce the JWE Encrypted Key. Assuming a client/server ...
Ronnie Royston's user avatar
3 votes
1 answer
480 views

How does JOSE/JWE make use of ECDH when encrypting/decrypting messages?

Disclaimer: I first posted this question on security.stackexchange some minutes ago but deleted it, this is probably a better place for it. My goal is to use JWE with hybrid encryption (ECDH+AES) for ...
ceaaj's user avatar
  • 33
1 vote
0 answers
56 views

Custom key for key wrapping using JOSE/JWK

I am trying to figure out how to use a custom password with a JWK that uses the password for key wrapping. The JWA spec contains for example "PBES2-HS512+A256KW", which does "PBES2 with ...
enzian's user avatar
  • 121
2 votes
0 answers
64 views

Secure option for (hybrid) encryption of a secret key using JWE

I want to encrypt a private key $sk$ (it's actually an RSA private key in PKCS#8 format) with another person's (and/or my) public key $pk_A$ for secure storage. With JWE, it is possible to use hybrid ...
bertrandrussellsghost's user avatar
1 vote
0 answers
1k views

In regard to using RSA-OAEP-256 in JWE to also authenticate token issuer

I'm not an expert on cryptography, so, the understanding below might not be entirely correct. From what I understand, in the context of JWE, the RSA-OAEP-256 key algorithm is meant to provide payload ...
Wendong's user avatar
  • 11
1 vote
1 answer
188 views

How can JWE support an integrity check given that it uses a public key to encrypt the message?

As far as I know JWE (JSON Web Encryption) supports both integrity and confidentiality. I agree about the confedintiality because only the recepient with a private key can decrypt a message. What ...
Abzal Serekov's user avatar
6 votes
1 answer
2k views

How does the Concat KDF work?

I am writing an application using JSON Web Encryption with ECDH using the X25519 Curve. The RFC says that ECHD-ES derived secret is run through a Concat KDF. Given ...
ams's user avatar
  • 621
1 vote
1 answer
240 views

JOSE: JWE CEK Initialization Vector Position or Reuse

So I am attempting to generate a JWE using an X25519 to encrypt the for the Content Encryption Key (CEK) and AES-256-GCM for the content. My issue however is that NaCl needs an IV (nonce in NaCl) for ...
Wil W's user avatar
  • 131
2 votes
1 answer
631 views

JWE between Android/iPhone and backend

I'm working on a solution where JWE is needed between an Android app and a backend written in Node.JS, using node-jose. I've been struggling a lot since it seems ...
JHH's user avatar
  • 121
0 votes
0 answers
68 views

Difference between JWE encryption algorithm RSAES-PKCS1-v1_5 and RSAES OAEP [duplicate]

In the specifications of JWE (RFC7516) they specify the values for (asymmetrically) encrypting the symmetric key. In RFC7518 in section 4.1 they list the options, of which two are relevant for my case ...
Krijn's user avatar
  • 115
2 votes
1 answer
597 views

Are there any security drawbacks for simply encrypting and MACing my JWS token (JWT)?

This question, while related, doesn't answer the security aspect I have in mind. I understand that signatures make it impossible for the tokens to be modified. But if I want the JWS token content to ...
The Quantum Physicist's user avatar
1 vote
0 answers
137 views

Why doesn't the JOSE suite/JWA include ECIES?

The JOSE suite specifics use of RSA-OAEP (for when one party has an RSA key) and ECDH (for when two parties have EC keys) in JWA. Why doesn't it include ECIES? It seems like a way to derive a key ...
kag0's user avatar
  • 115
3 votes
1 answer
2k views

AES 128 GCM - dynamic key with static IV/nonce

I'm working on a project to upgrade an existing system that currently uses RC4 to encrypt a payload with a random session key. The session key is then encrypted with asymmetric public key encryption (...
Alastair McCormack's user avatar
3 votes
1 answer
613 views

AEAD: Is it secure to decrypt the content encryption key before verifying the MAC?

The JSON Web Encryption (JWE) standard defines a number of encryption modes with the same basic form: First, the a unique content encryption key (CEK) is generated and used to encrypt the payload ...
Neil Madden's user avatar