pike.git / lib / modules / Crypto.pmod / DSA.pmod

version» Context lines:

pike.git/lib/modules/Crypto.pmod/DSA.pmod:294:   #undef Sequence       //! Signs the @[message] with a PKCS-1 signature using hash algorithm    //! @[h].    string(8bit) pkcs_sign(string(8bit) message, .Hash h)    {    array sign = map(raw_sign(hash(message, h)), Standards.ASN1.Types.Integer);    return Standards.ASN1.Types.Sequence(sign)->get_der();    }    +  // FIXME: Consider implementing RFC 6979. +    #define Object Standards.ASN1.Types.Object       //! Verify PKCS-1 signature @[sign] of message @[message] using hash    //! algorithm @[h].    int(0..1) pkcs_verify(string(8bit) message, .Hash h, string(8bit) sign)    {    Object a = Standards.ASN1.Decode.secure_der_decode(sign);       // The signature is the DER-encoded ASN.1 sequence Dss-Sig-Value    // with the two integers r and s. See RFC 3279 section 2.2.2.