File src/pkg/crypto/rsa/pss.go (right):
https://codereview.appspot.com/9438043/diff/20001/src/pkg/crypto/rsa/pss.go#newcode190
src/pkg/crypto/rsa/pss.go:190: func SignPSS(rand io.Reader, priv
*PrivateKey, hash crypto.Hash, hashed []byte, saltLen int) (s []byte,
err error) {
Some reorganisation is probably needed before landing, but I can do that
before submitting.
The only important point is the interface: I don't think the saltLen
parameters should be there.
OpenSSL allows one to specify an optional structure that can set the
salt len but the defaults are to set the salt to be as long as possible
when encoding and decoding. I think we should mirror that or, if you
feel strongly that the salt length needs to be a parameter, then we
could have a optional options struct. But OpenSSL's version includes
some pretty obscure options that I'm not sure that we would want to
support:
typedef struct rsa_pss_params_st
»·······{
»·······X509_ALGOR *hashAlgorithm;
»·······X509_ALGOR *maskGenAlgorithm;
»·······ASN1_INTEGER *saltLength;
»·······ASN1_INTEGER *trailerField;
»·······} RSA_PSS_PARAMS;
https://codereview.appspot.com/9438043/
--
---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.