5
$\begingroup$

What means when pgpdump shows this kind of algorithm in the Public-Key Encrypted Session Key Packet?

New: Public-Key Encrypted Session Key Packet(tag 1)(126 bytes)
    New version(3)
    Key ID - 0xEC661A345473
    Pub alg - Reserved for Elliptic Curve(pub 18)
        unknown(pub 18)
        -> m = sym alg(1 byte) + checksum(2 bytes) + PKCS-1 block type 02

What means m = sym alg(1 byte) + checksum(2 bytes) + PKCS-1 block type 02?

Which Elliptic-Curve-based operation was made from the sender software?

$\endgroup$
2
$\begingroup$
Pub alg - Reserved for Elliptic Curve(pub 18)
    unknown(pub 18)

The output explains pgpdump knows this is an elliptic curve algorithm (which has ID 18), but does not understand the exact details (which curve was used, ...). Try gpg --list-packets instead which has full support for ECC (requires GnuPG 2.1, binary might also be called gpg2 on Debian and derivatives).

    -> m = sym alg(1 byte) + checksum(2 bytes) + PKCS-1 block type 02

These are details of the session key used for the symmetrically encrypted packet that will follow: the symmetric algorithm, a checksum and finally the PKCS-1 encoded session key. From RFC 4880, OpenPGP, 5.1. Public-Key Encrypted Session Key Packets (Tag 1):

The value "m" in the above formulas is derived from the session key as follows. First, the session key is prefixed with a one-octet algorithm identifier that specifies the symmetric encryption algorithm used to encrypt the following Symmetrically Encrypted Data Packet. Then a two-octet checksum is appended, which is equal to the sum of the preceding session key octets, not including the algorithm identifier, modulo 65536. This value is then encoded as described in PKCS#1 block encoding EME-PKCS1-v1_5 in Section 7.2.1 of [RFC3447] to form the "m" value used in the formulas above. See Section 13.1 of this document for notes on OpenPGP's use of PKCS#1.

$\endgroup$
  • $\begingroup$ and what means m**e mod n ? in the RFC-4880 you linked me? thank you $\endgroup$ – Alexander.It Sep 6 '15 at 12:50
  • $\begingroup$ @Alexander.It, m**e mod n should be $m^e\bmod n$. $\endgroup$ – SEJPM Sep 6 '15 at 13:18
  • 1
    $\begingroup$ The formula describes the encryption using RSA, for ECC look into RFC 6637. $\endgroup$ – Jens Erat Sep 6 '15 at 13:26
  • $\begingroup$ I also think the same but why not write m^e ? :@ $\endgroup$ – Alexander.It Sep 6 '15 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.