Skip to content

Commit 77090fe

Browse files
authored
Fix ECDH using v6 keys (#233)
When using ECDH with v6 keys, the fingerprint length is not 20 bytes, so the KDF param is not 45 bytes.
1 parent 7852179 commit 77090fe

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

openpgp/ecdh/ecdh.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,6 @@ func buildKey(pub *PublicKey, zb []byte, curveOID, fingerprint []byte, stripLead
166166
if _, err := param.Write(fingerprint[:]); err != nil {
167167
return nil, err
168168
}
169-
if param.Len()-len(curveOID) != 45 {
170-
return nil, errors.New("ecdh: malformed KDF Param")
171-
}
172169

173170
// MB = Hash ( 00 || 00 || 00 || 01 || ZB || Param );
174171
h := pub.KDF.Hash.New()

0 commit comments

Comments
 (0)