Python RSA implementation with PKCS1

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jiee
    New Member
    • Apr 2010
    • 3

    Python RSA implementation with PKCS1

    I'm working on this Python package for RSA implementation <link removed>,However,It only gives a RSA implementation without PKCS1 padding.

    I'm now trying to improve the code snippets for PKCS1 padding. I followed the RFC2313 http://www.faqs.org/rfcs/rfc2313.html and get a list object like this:

    Code:
    m = [0,2,random integers,0, integers]
    According to RFC2313, the list above is to be transformed into "an integer in big-endian form", and the following equation was given:


    x = SUM 2^(8(len(k)-i)) m[i] .

    I was confused about how to transform the list object into "an integer in bigendian form". Any snippets written in Python would solve this problem?

    Any help would be appreciated.
    Jiee
    Last edited by Frinavale; Apr 15 '10, 07:50 PM. Reason: Removed link.
Working...