Skip to content

Implement Persistent Symmetric Keys#303

Open
twiss wants to merge 5 commits into
mainfrom
psk
Open

Implement Persistent Symmetric Keys#303
twiss wants to merge 5 commits into
mainfrom
psk

Conversation

@twiss

@twiss twiss commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

Implements draft-ietf-openpgp-persistent-symmetric-keys-03.

Only adds support in openpgp/v2, as API changes are needed.

@twiss
twiss requested a review from lubux March 13, 2026 15:19
Comment thread openpgp/packet/encrypted_key.go Dismissed
Comment thread openpgp/packet/signature.go Fixed
@twiss
twiss marked this pull request as ready for review July 9, 2026 11:09
Comment thread openpgp/packet/encrypted_key.go
Comment thread openpgp/packet/persistent_symmetric_key.go
Comment thread openpgp/packet/encrypted_key.go
Comment thread openpgp/packet/signature.go
Comment thread openpgp/packet/signature.go

// VerifySignature returns nil iff sig is a valid signature, made by this
// key, of the data hashed into signed. signed is mutated by this call.
func (psk *PersistentSymmetricKey) VerifySignature(signed hash.Hash, sig *Signature) (err error) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VerifyAuthenticationTag? Authenticate?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is partially a copy of the PublicKey.VerifySignature() function, and matches its interface, so I would prefer to keep it the same, also since we're verifying a signature packet here.

Comment thread openpgp/packet/persistent_symmetric_key.go
Comment thread openpgp/packet/public_key.go
Comment thread openpgp/v2/keys.go
Comment thread openpgp/v2/read.go
IsSymmetricallyEncrypted bool // true if a passphrase could have decrypted the message.
DecryptedWith Key // the private key used to decrypt the message, if any.
DecryptedWithAlgorithm packet.CipherFunction // Stores the algorithm used to decrypt the message, if any.
IsSigned bool // true if the message is signed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add an additional info field IsSymmetricallyAuthenticated

Comment thread openpgp/packet/signature.go Dismissed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants