FAQ
hi,
    I want to sign with rsa.SignPKCS1v15 in go, and verify with openssl ' s
  RSA_verify in C language, but verify failed. Can anybody help me ? thx so
much...

sinppet code in go:

hashMD5 := md5.New()
hashMD5.Write([]byte("abc"))
Digest := hashMD5.Sum(nil)
Sign, Err := rsa.SignPKCS1v15(rand.Reader, LSKey, crypto.MD5, Digest)
Err = rsa.VerifyPKCS1v15(&LSKey.PublicKey, crypto.MD5, Digest, Sign)
//this is OK!!!

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Jesse McNelis at Nov 13, 2013 at 3:43 am

    On Wed, Nov 13, 2013 at 2:37 PM, bobo he wrote:

    hi,
    I want to sign with rsa.SignPKCS1v15 in go, and verify with openssl ' s
    RSA_verify in C language, but verify failed. Can anybody help me ? thx so
    much...

    sinppet code in go:

    hashMD5 := md5.New()
    hashMD5.Write([]byte("abc"))
    Digest := hashMD5.Sum(nil)
    Sign, Err := rsa.SignPKCS1v15(rand.Reader, LSKey, crypto.MD5, Digest)
    Err = rsa.VerifyPKCS1v15(&LSKey.PublicKey, crypto.MD5, Digest, Sign)
    //this is OK!!!
    Perhaps you could also give us an example of how you're calling
    RSA_verify() in C.




    --
    =====================
    http://jessta.id.au

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Bobo he at Nov 13, 2013 at 4:07 am
    int verify = RSA_verify(NID_md5, (unsigned char *)&digest, len, (unsigned
    char *)signature, siglen, pub_key);

    在 2013年11月13日星期三UTC+8上午11时37分22秒,bobo he写道:
    hi,
    I want to sign with rsa.SignPKCS1v15 in go, and verify with openssl ' s
    RSA_verify in C language, but verify failed. Can anybody help me ? thx so
    much...

    sinppet code in go:

    hashMD5 := md5.New()
    hashMD5.Write([]byte("abc"))
    Digest := hashMD5.Sum(nil)
    Sign, Err := rsa.SignPKCS1v15(rand.Reader, LSKey, crypto.MD5, Digest)
    Err = rsa.VerifyPKCS1v15(&LSKey.PublicKey, crypto.MD5, Digest, Sign)
    //this is OK!!!
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedNov 13, '13 at 3:37a
activeNov 13, '13 at 4:07a
posts3
users2
websitegolang.org

2 users in discussion

Bobo he: 2 posts Jesse McNelis: 1 post

People

Translate

site design / logo © 2022 Grokbase