Skip to content

Commit

Permalink
Merge pull request #25 from chris-wood/caw/ciphertext-for-enc
Browse files Browse the repository at this point in the history
Use ciphertext size for the encapsulated secret
  • Loading branch information
chris-wood committed May 23, 2023
2 parents b8ae3b5 + 9d687d9 commit 45fb0d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ohttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func UnmarshalEncapsulatedRequest(enc []byte) (EncapsulatedRequest, error) {
}
aeadID := hpke.AEAD(binary.BigEndian.Uint16(aeadIDBuffer))

key := make([]byte, kemID.Scheme().PublicKeySize())
key := make([]byte, kemID.Scheme().CiphertextSize())
_, err = b.Read(key)
if err != nil {
return EncapsulatedRequest{}, err
Expand Down

0 comments on commit 45fb0d0

Please sign in to comment.