Crypto: Use argument default value syntax in multiple places.
Crypto.RSA: Fix type for crypt(). crypt() may return zero in decrypt() mode.
A few type fixes.
Crypto: Stricter handling of zero.
Crypto: Fix multiple warnings about passing of zero values.
Added zero as return type on methods containing 'return 0'
Crypto.RSA: Stricter types.
Crypto.RSA: Fix some warnings.
Merge commit '722771973bd' into patches/lyslyskom22891031 * commit '722771973bd': (6177 commits) Verify that callablep responses are aligned with reality. ...
Merge remote-tracking branch 'origin/master' into new_utf8
Merge remote-tracking branch 'origin/8.1' into gobject-introspection
Merge branch '8.1' into peter/travis
Type fix.
Crypto.RSA: Implemented jwk(). Support generation of JSON Web Keys (JWKs) from RSA objects. Fixes some of PIKE-39 (#8039).
Crypto.RSA.State: Fix bugs in LFUN::_equal(). Crypto.RSA.PSSState()->_equal() interfered with _equal() for the other states.
Crypto.RSA.OAEP: Fixed typo.
Crypto.RSA: Fixed multiple warnings. Fixes several testsuite failures.
Crypto.RSA: Support initialization from a JWK mapping.
Documentation breakage When preparing a new Debian package of 8.0.240, I noticed that some documentation disappeared, apparently due to the following. The error in Nettle.Sign is already corrected but not the others, AFAICT, and I'm guessing that @exp should be @expr. Patch below, which I home someone can apply right away. ERROR: <Invalid error container: Tools.AutoDoc.AutoDocError(SourcePosition(File: /build/pike8.0-8.0.240/src/modules/Gmp/mpz_glue.c, lines: 668..668), "DocParser", "@exp cannot be used like this: @exp{ ... @}")> ERROR: <Invalid error container: Tools.AutoDoc.AutoDocError(SourcePosition(File: /build/pike8.0-8.0.240/lib/modules/__builtin.pmod/Nettle.pmod/Sign.pike, lines: 102..102), "DocParser", "@item is not allowed inside @array (allowed children are: @elem)")> ERROR: <Invalid error container: Tools.AutoDoc.AutoDocError(SourcePosition(File: /build/pike8.0-8.0.240/lib/modules/Crypto.pmod/ECC.pmod, lines: 286..286), "DocParser", "@item is not allowed inside @array (allowed children are: @elem)")> ERROR: <Invalid error container: Tools.AutoDoc.AutoDocError(SourcePosition(File: /build/pike8.0-8.0.240/lib/modules/Crypto.pmod/RSA.pmod, lines: 368..368), "DocParser", "@item is not allowed inside @array (allowed children are: @elem)")>
Docs formatting to fix build error
Documentation [Crypto.RSA]: Fixed cut and paste error.
Crypto.RSA: Some API changes for jose_sign(). Changed argument order and added defaults for the hash algorithm.
Documentation [RSA]: Minor doc change for jose_decode().
Crypto.RSA: Add some support for JOSE JWS signatures.
Crypto: Added algorithm identifiers from JWA (RFC 7518:3.1). Fixes some of [bug 7671 (#7671)].
SHA256 is assumed due to Nettle version requirements.
Crypto.RSA [SSL.Context]: Fixed some warnings.
Crypto.RSA: Throw an error on large e in generate_key(). This makes the testsuite happy on platforms without hogweed.
Use random_string instead of Crypto.Random.random_string
Crypto.RSA: Fixed some types. Fixes warnings generated by SSL.Context [LysLysKOM 21537223].
Crypto.RSA: Added support for RSAES-OAEP (RFC 3447:7.1).
Crypto.RSA: Added pkcs_signature_algorithm_id() for PSS.
Crypto.RSA: Fixed multiple typing errors. Values of type Crypto.RSA.LowState should be possible to assign to variables declared as Crypto.RSA.State without drowning in warnings... Also restores the default return value of name() to "RSA".
Crypto.RSA: Cleaned up RSASSA-PSS API. It is now possible to get a PSS signature object from an RSA state by indexing it with "PSS". Eg Crypto.RSA.State rsa = ...; string(8bit) sign = rsa->PSS->pkcs_sign(message, hash); int(0..1) ok = rsa->PSS->pkcs_verify(message, hash, sign); Also adds a corresponding symbol "PKCS1_5" for the traditional (and default) PKCS#1 1.5 style signatures.
Crypto.RSA: Added pss_{sign,verify}() implementing RSASSA-PSS. Note: This is a temporary API as it is not compatible with the __builtin.Nettle.Sign API.
Removed trailing spaces.
Crypto.RSA: Fixed some more warnings with old Nettle. Fixes remainder of [bug 7469 (#7469)] and [bug 7477 (#7477)].
Crypto.RSA: Fixed warnings with old Nettle. Fixes remainder of [bug 7469 (#7469)].
Improve a comment.
Stop caching the RSA key size.
Use side channel silent powm.
Crypto.RSA: Break compilation circularity. There's a circularity between Crypto.RSA and Standards.PKCS.RSA.
Crypto.RSA: Improved robustness of compat generate_key().
Crypto.Sign: Fixed indent.
Use faster and better looking padding. This however limits us to 2147483648 bit RSA keys.
Move deprecated code to compat. Something is wrong with the method overloading / variant, so generate_key compat is disabled.
this_program:: -> this::
Moved the compat generate_key into the deprecated section.
Fail signatures with the wrong size. This may be a compatibility issue.
Added some references to PKCS#1
Signatures needs to be padded to the full size.
Crypto.Sign: Added sub-class State. This makes the Crypto.Sign API to behave closer to the other Crypto APIs. This affects code that uses Crypto.RSA and Crypto.DSA (which now are modules and not classes). Crypto.ECC.Curve.ECDSA is currently unmodified.