Documentation ¶
Overview ¶
Package rsapad implements RSA padding, extracted from the standard library.
The Go standard library implements RSA padding as part of RSA signing/encryption but does not expose these primitives separately. Smart cards implement the signing/encryption but not padding portions of RSA, so we must perform padding manually
package rsapad provides RSA padding functions extracted from the Go standard library
These functions are necessary as smartcards often only implement parts of the usual smartcard signing operations
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DigestInfoWrap ¶
DigestInfoWrap wraps `hashed` in the PKCS1v1.5 DigestInfo struct for `hash`
func PadPSS ¶
func PadPSS(rand io.Reader, pub *rsa.PublicKey, hash crypto.Hash, hashed []byte, opts *rsa.PSSOptions) ([]byte, error)
PadPSS calculates PSS padding
func PadSignPKCS1v15 ¶
PadSignPKCS1v15 calculates the padding for signing using RSA PKCS#1 v1.5
This function is deterministic. Thus, if the set of possible messages is small, an attacker may be able to build a map from messages to signatures and identify the signed messages. As ever, signatures provide authenticity, not confidentiality.
Types ¶
This section is empty.