Skip to main content
replaced http://tools.ietf.org/html/rfc with https://www.rfc-editor.org/rfc/rfc
Source Link

In this case we get 5 bytes (40-bit) output, the symmetric key we need. The input was PKCS#1 v1.5PKCS#1 v1.5 padded (see §8.1) for various reasons, hence the size disparity.

Now here's the slightly tricky bit, for RC2 refer to section 6 of RFC 2268RFC 2268:

In this case we get 5 bytes (40-bit) output, the symmetric key we need. The input was PKCS#1 v1.5 padded (see §8.1) for various reasons, hence the size disparity.

Now here's the slightly tricky bit, for RC2 refer to section 6 of RFC 2268:

In this case we get 5 bytes (40-bit) output, the symmetric key we need. The input was PKCS#1 v1.5 padded (see §8.1) for various reasons, hence the size disparity.

Now here's the slightly tricky bit, for RC2 refer to section 6 of RFC 2268:

replaced http://security.stackexchange.com/ with https://security.stackexchange.com/
Source Link

Yes you can. This example uses openssl smime with the default RC2 CBC with a 40-bit key. The newer cms sub-command behaves slightly differentlycms sub-command behaves slightly differently, and uses 3-DES by default. You probably shouldn't be using either of those algorithms to encrypt important data ;-)

The en/decryption is along the lines of most RSA-using methods: use (slow, expensive) RSA to en/decrypt a symmetric key, and use the fast symmetric key to en/decrypt the real data. (See this questionthis question or thisthis for more background).

In this case we get 5 bytes (40-bit) output, the symmetric key we need. The input was PKCS#1 v1.5 padded (see §8.1) for various reasonsvarious reasons, hence the size disparity.

Yes you can. This example uses openssl smime with the default RC2 CBC with a 40-bit key. The newer cms sub-command behaves slightly differently, and uses 3-DES by default. You probably shouldn't be using either of those algorithms to encrypt important data ;-)

The en/decryption is along the lines of most RSA-using methods: use (slow, expensive) RSA to en/decrypt a symmetric key, and use the fast symmetric key to en/decrypt the real data. (See this question or this for more background).

In this case we get 5 bytes (40-bit) output, the symmetric key we need. The input was PKCS#1 v1.5 padded (see §8.1) for various reasons, hence the size disparity.

Yes you can. This example uses openssl smime with the default RC2 CBC with a 40-bit key. The newer cms sub-command behaves slightly differently, and uses 3-DES by default. You probably shouldn't be using either of those algorithms to encrypt important data ;-)

The en/decryption is along the lines of most RSA-using methods: use (slow, expensive) RSA to en/decrypt a symmetric key, and use the fast symmetric key to en/decrypt the real data. (See this question or this for more background).

In this case we get 5 bytes (40-bit) output, the symmetric key we need. The input was PKCS#1 v1.5 padded (see §8.1) for various reasons, hence the size disparity.

typo in xxd command
Source Link
mr.spuratic
  • 8.1k
  • 27
  • 37
$ dumpasn1 -a -203 smime.p7m | tail -qn +2 | xxrxxd -r -p > rsa.bin
$ dumpasn1 -a -203 smime.p7m | tail -qn +2 | xxr -r -p > rsa.bin
$ dumpasn1 -a -203 smime.p7m | tail -qn +2 | xxd -r -p > rsa.bin
added 29 characters in body
Source Link
mr.spuratic
  • 8.1k
  • 27
  • 37
Loading
added 440 characters in body
Source Link
mr.spuratic
  • 8.1k
  • 27
  • 37
Loading
Source Link
mr.spuratic
  • 8.1k
  • 27
  • 37
Loading