[prev in list] [next in list] [prev in thread] [next in thread]
List: mozilla-crypto
Subject: Re: Which algorithm for SGN_Digest?
From: Philippe Camacho <tempo.warrior () free ! fr>
Date: 2004-10-29 17:10:56
Message-ID: clttj3$3op4 () ripley ! netscape ! com
[Download RAW message or body]
Nelson B wrote:
> Philippe Camacho wrote:
>
>> I try to use SGN_Digest with the algorithm
>> SEC_OID_PKCS1_RSA_ENCRYPTION but it fails: The error code given by
>> PR_GetError is -8186 (Bad algorithm). I tried other algorithms but it
>> still failed...
>> Which algorithm I am supposed to use?
>>
>> Thanks for help.
>
>
> A "digest" is a cryptographic hash, not a signature, and not encryption.
> The OID you cite above is an OID for an encryption/signature algorithm,
> not an OID for a hash algorithm.
> You need to specify one of the following values:
>
> SEC_OID_MD2
> SEC_OID_MD5
> SEC_OID_SHA1
> SEC_OID_SHA256
> SEC_OID_SHA384
> SEC_OID_SHA512
>
> See
> http://lxr.mozilla.org/security/source/security/nss/lib/util/secdig.c#95
>
Thank very much it works fine now!
_______________________________________________
mozilla-crypto mailing list
mozilla-crypto@mozilla.org
http://mail.mozilla.org/listinfo/mozilla-crypto
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic