Results 1 to 15 of 20

Thread: Sistemul De Acces Conditionat!

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    Standard RSP member gessle's Avatar
    Join Date
    31 Jan 2007
    Location
    tg ocna;jud. BACAU
    Posts
    719
    Mentioned
    0 Post(s)
    Rep Power
    74

    Default Re: Sistemul De Acces Conditionat!

    The usual formats used for such a message are either a CMS enveloped-data object or XML, but the above summary includes all the necessary info (well, perhaps "Bob" might be defined a bit more accurately). CMS enveloped-data objects (yes, that's enveloped not encrypted) use ASN.1 and are encoded using either DER- or BER-encoding. Cryptographic Message Syntax (CMS) is a less-ambiguous version of the earlier PKCS#7 standard (also of the same name) and is designed to be used in S/MIME messages. The terminology for CMS and ASN.1 may sound messy, but the end results are well-defined and universally-accepted. On the other hand, the XML cryptographic standards are, to be honest, a complete mess. Pretty Good Privacy (PGP) also has a format for RSA messages, although PGP stopped using RSA because of patent issues back in the 1990s.
    Nothing, of course, stops you and your recipient from agreeing on your own format and using that. But be careful, even the experts get these things wrong and accidentally give away more than they realise.
    Signing using PKCS#1v1.5

    Algorithm: Signing using PKCS#1v1.5 INPUT: Sender's RSA private key, (n, d) of length k = |n| bytes; message, M, to be signed; message digest algorithm, Hash.
    OUTPUT: Signed data block of length k bytes

    1. Compute the message digest H of the message, H = Hash(M)
    2. Form the byte string, T, from the message digest, H, according to the message digest algorithm, Hash, as follows

    Hash T
    MD5 30 20 30 0c 06 08 2a 86 48 86 f7 0d 02 05 05 00 04 10 || H
    SHA-1 30 21 30 09 06 05 2b 0e 03 02 1a 05 00 04 14 || H SHA-25630 31 30 0d 06 09 60 86 48 01 65 03 04 02 0105 00 04 20 || H
    SHA-384 30 41 30 0d 06 09 60 86 48 01 65 03 04 02 02 05 00 04 30 || H SHA-51230 51 30 0d 06 09 60 86 48 01 65 03 04 02 03 05 00 04 40 || H
    where T is an ASN.1 value of type DigestInfo encoded using the Distinguished Encoding Rules (DER).



    1. Form the k-byte encoded message block, EB, EB = 00 || 01 || PS || 00 || T
      where || denotes concatenation and PS is a string of bytes all of value 0xFF of such length so that |EB|=k.
    2. Convert the byte string, EB, to an integer m, most significant byte first, m = StringToInteger(EB, k)
    3. Sign with the RSA algorithm s = m^d mod n
    4. Convert the resulting signature value, s, to a k-byte output block, OB OB = IntegerToString(s, k)
    5. Output OB.
    Last edited by gessle; 15-03-09 at 03:35.
    FOCUS SAT-UPC;RCS-digital cablu;ADSL;BAYERN MUNCHEN&AC MILAN;
    .de

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •