Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

pss: Allow variable padding in pss/crypto messages #1738

Open
kortatu opened this issue Sep 10, 2019 · 0 comments
Open

pss: Allow variable padding in pss/crypto messages #1738

kortatu opened this issue Sep 10, 2019 · 0 comments

Comments

@kortatu
Copy link
Contributor

kortatu commented Sep 10, 2019

A sender should be able to specify the amount and even the content of padding to append in each message through the API.
Right now the padding in current fallback crypto implementation is fixed, although we kept methods prepared to specify amount of padding to append.
This could be specified inside WrapParams, that currently only allows the API caller to select the encryption keys.

type WrapParams struct {
	Sender       *ecdsa.PrivateKey // Private key of sender used for signature
	Receiver     *ecdsa.PublicKey  // Public key of receiver for encryption
	SymmetricKey []byte            // Symmetric key for encryption
}

If a custom content for a padding is specify, there will be appended as is, if not, the message should be filled up with random content up to a specified multiple of a paddedSize param.

Related with PR #1703

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant