
Received: from hoffman.proper.com (localhost [127.0.0.1]) by hoffman.proper.com (8.14.4/8.14.3) with ESMTP id o5OLHWVn094338 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Jun 2010 14:17:32 -0700 (MST) (envelope-from owner-ietf-openpgp@mail.imc.org)
Received: (from majordom@localhost) by hoffman.proper.com (8.14.4/8.13.5/Submit) id o5OLHWpo094337; Thu, 24 Jun 2010 14:17:32 -0700 (MST) (envelope-from owner-ietf-openpgp@mail.imc.org)
X-Authentication-Warning: hoffman.proper.com: majordom set sender to owner-ietf-openpgp@mail.imc.org using -f
Received: from mail-ew0-f43.google.com (mail-ew0-f43.google.com [209.85.215.43]) by hoffman.proper.com (8.14.4/8.14.3) with ESMTP id o5OLHUJs094332 for <ietf-openpgp@imc.org>; Thu, 24 Jun 2010 14:17:31 -0700 (MST) (envelope-from nagydani@epointsystem.org)
Received: by ewy9 with SMTP id 9so571247ewy.16 for <ietf-openpgp@imc.org>; Thu, 24 Jun 2010 14:17:29 -0700 (PDT)
Received: by 10.87.30.35 with SMTP id h35mr6145278fgj.73.1277414249305; Thu, 24 Jun 2010 14:17:29 -0700 (PDT)
Received: from [10.77.0.151] (78-131-55-134.static.hdsnet.hu [78.131.55.134]) by mx.google.com with ESMTPS id 3sm15999316fge.5.2010.06.24.14.17.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 24 Jun 2010 14:17:28 -0700 (PDT)
Message-ID: <4C23CB67.3000703@epointsystem.org>
Date: Thu, 24 Jun 2010 23:17:27 +0200
From: "Daniel A. Nagy" <nagydani@epointsystem.org>
User-Agent: Thunderbird 2.0.0.24 (X11/20100317)
MIME-Version: 1.0
To: Brian Lewis <brian@monetra.com>
CC: ietf-openpgp@imc.org
Subject: Re: ElGamal, EME-PKCS1-v1_5
References: <20100624173119.GJ25604@brian.internal.monetra.com>
In-Reply-To: <20100624173119.GJ25604@brian.internal.monetra.com>
X-Enigmail-Version: 0.95.0
Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig292AE4AE63723EB91C7C45D9"
Sender: owner-ietf-openpgp@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-openpgp/mail-archive/>
List-Unsubscribe: <mailto:ietf-openpgp-request@imc.org?body=unsubscribe>
List-ID: <ietf-openpgp.imc.org>

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig292AE4AE63723EB91C7C45D9
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello,

Brian Lewis wrote:
> So I need m =3D EME-PKCS1-v1_5(...). According to
> http://tools.ietf.org/html/rfc3447#section-7.2.1, PS is k - mLen
> - 3 random nonzero bytes, where k is the length of RSA n in bytes. But =
I
> don't have RSA n. I have ElGamal p, g, and y.
>=20
> In EME-PKCS1-v1_5, what is k if I'm using ElGamal?

You should use the length of ElGamal p.

--=20
Daniel


--------------enig292AE4AE63723EB91C7C45D9
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREIAAYFAkwjy2cACgkQoeH/BzqmYjg4IQCgpw5+KIAXiDH97ZZaaxhyis/Z
dPIAn3OwEwKusanHea7oOhwLldg2B8dk
=RNIV
-----END PGP SIGNATURE-----

--------------enig292AE4AE63723EB91C7C45D9--



Received: from hoffman.proper.com (localhost [127.0.0.1]) by hoffman.proper.com (8.14.4/8.14.3) with ESMTP id o5OK8tvi090410 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Jun 2010 13:08:55 -0700 (MST) (envelope-from owner-ietf-openpgp@mail.imc.org)
Received: (from majordom@localhost) by hoffman.proper.com (8.14.4/8.13.5/Submit) id o5OK8tU6090409; Thu, 24 Jun 2010 13:08:55 -0700 (MST) (envelope-from owner-ietf-openpgp@mail.imc.org)
X-Authentication-Warning: hoffman.proper.com: majordom set sender to owner-ietf-openpgp@mail.imc.org using -f
Received: from mail.mainstreetsoftworks.com (mail.mainstreetsoftworks.com [216.155.111.4]) by hoffman.proper.com (8.14.4/8.14.3) with ESMTP id o5OK8sW1090402 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for <ietf-openpgp@imc.org>; Thu, 24 Jun 2010 13:08:55 -0700 (MST) (envelope-from brian@monetra.com)
Received: from localhost (shop.monetra.com [216.155.101.90]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mainstreetsoftworks.com (Postfix) with ESMTPSA id A9E1584402F; Thu, 24 Jun 2010 16:08:47 -0400 (EDT)
Date: Thu, 24 Jun 2010 16:10:26 -0400
From: Brian Lewis <brian@monetra.com>
To: Marko Kreen <markokr@gmail.com>
Cc: ietf-openpgp@imc.org
Subject: Re: ElGamal, EME-PKCS1-v1_5
Message-ID: <20100624201026.GL25604@brian.internal.monetra.com>
References: <20100624173119.GJ25604@brian.internal.monetra.com> <AANLkTilyE2RAaXxa2sfKgzY0xiGM6Y-5budUOJbTkdwd@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTilyE2RAaXxa2sfKgzY0xiGM6Y-5budUOJbTkdwd@mail.gmail.com>
X-monetra-com-MailScanner-Information: Please contact the ISP for more information
X-monetra-com-MailScanner-ID: A9E1584402F.A3E16
X-monetra-com-MailScanner: Found to be clean
X-monetra-com-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-8.899, required 4.7, ALL_TRUSTED -1.80, BAYES_00 -2.60, USER_IN_WHITELIST -4.50)
X-monetra-com-MailScanner-From: brian@monetra.com
X-Spam-Status: No
Sender: owner-ietf-openpgp@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-openpgp/mail-archive/>
List-Unsubscribe: <mailto:ietf-openpgp-request@imc.org?body=unsubscribe>
List-ID: <ietf-openpgp.imc.org>

On Thursday, 24.06.10 at 22:52, Marko Kreen wrote:
> On 6/24/10, Brian Lewis <brian@monetra.com> wrote:
> >  I'm trying to generate a tag 1 (public-key encrypted session key)
> >  packet.
> >
> >  I'm using ElGamal, so the algorithm-specific fields are, according to
> >  http://tools.ietf.org/html/rfc4880#section-5.1,
> >  MPI g**k mod p
> >  MPI m * y**k mod p
> >
> >  So I need m = EME-PKCS1-v1_5(...). According to
> >  http://tools.ietf.org/html/rfc3447#section-7.2.1, PS is k - mLen
> >  - 3 random nonzero bytes, where k is the length of RSA n in bytes. But I
> >  don't have RSA n. I have ElGamal p, g, and y.
> >
> >  In EME-PKCS1-v1_5, what is k if I'm using ElGamal?
>
> mod p ~ mod n

I don't understand. Could you elaborate?



Received: from hoffman.proper.com (localhost [127.0.0.1]) by hoffman.proper.com (8.14.4/8.14.3) with ESMTP id o5OJqdAk089528 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Jun 2010 12:52:39 -0700 (MST) (envelope-from owner-ietf-openpgp@mail.imc.org)
Received: (from majordom@localhost) by hoffman.proper.com (8.14.4/8.13.5/Submit) id o5OJqdAY089527; Thu, 24 Jun 2010 12:52:39 -0700 (MST) (envelope-from owner-ietf-openpgp@mail.imc.org)
X-Authentication-Warning: hoffman.proper.com: majordom set sender to owner-ietf-openpgp@mail.imc.org using -f
Received: from mail-ww0-f43.google.com (mail-ww0-f43.google.com [74.125.82.43]) by hoffman.proper.com (8.14.4/8.14.3) with ESMTP id o5OJqbjC089521 for <ietf-openpgp@imc.org>; Thu, 24 Jun 2010 12:52:38 -0700 (MST) (envelope-from markokr@gmail.com)
Received: by wwd20 with SMTP id 20so106574wwd.16 for <ietf-openpgp@imc.org>; Thu, 24 Jun 2010 12:52:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=xGI9otJ2ud5zIZCBqoZqZIuimrt/rALrSE1J7JEU3Jw=; b=N7ITyQTPPLV2hQj12RpnSw8AwK3IwwkO9QEwKVUy9B8ECoQPuLjzlx/Wv9qMeCJdEf KzAkKhr3oAonwKqDnMzCiNsqcn3MbGZKxhlE0xKXahpuGyFbZDBVpxhmkuuXL6zJAacy aLeURW9eQw8KQDNlx/eiSHVUR1Xe5N+zQRKFo=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=V4bPWg3hhYng9fpszYG1lwNQYDsaG1OceqCw5xnt4cHUyA2DbHAec6xLDciEZsXMJh 9ArbXOEkrXfPLGZjPQzVeiaIL3EoxItpeX1yuUUWiLVOpIZokO3huMequs2KmvoiLj3e pi4QHuKrIpS45x9GRh9WH9GA/3J0TCFHMmB/o=
MIME-Version: 1.0
Received: by 10.216.160.132 with SMTP id u4mr7319871wek.19.1277409156055; Thu,  24 Jun 2010 12:52:36 -0700 (PDT)
Received: by 10.216.175.69 with HTTP; Thu, 24 Jun 2010 12:52:35 -0700 (PDT)
In-Reply-To: <20100624173119.GJ25604@brian.internal.monetra.com>
References: <20100624173119.GJ25604@brian.internal.monetra.com>
Date: Thu, 24 Jun 2010 22:52:35 +0300
Message-ID: <AANLkTilyE2RAaXxa2sfKgzY0xiGM6Y-5budUOJbTkdwd@mail.gmail.com>
Subject: Re: ElGamal, EME-PKCS1-v1_5
From: Marko Kreen <markokr@gmail.com>
To: Brian Lewis <brian@monetra.com>
Cc: ietf-openpgp@imc.org
Content-Type: text/plain; charset=ISO-8859-1
Sender: owner-ietf-openpgp@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-openpgp/mail-archive/>
List-Unsubscribe: <mailto:ietf-openpgp-request@imc.org?body=unsubscribe>
List-ID: <ietf-openpgp.imc.org>

On 6/24/10, Brian Lewis <brian@monetra.com> wrote:
>  I'm trying to generate a tag 1 (public-key encrypted session key)
>  packet.
>
>  I'm using ElGamal, so the algorithm-specific fields are, according to
>  http://tools.ietf.org/html/rfc4880#section-5.1,
>  MPI g**k mod p
>  MPI m * y**k mod p
>
>  So I need m = EME-PKCS1-v1_5(...). According to
>  http://tools.ietf.org/html/rfc3447#section-7.2.1, PS is k - mLen
>  - 3 random nonzero bytes, where k is the length of RSA n in bytes. But I
>  don't have RSA n. I have ElGamal p, g, and y.
>
>  In EME-PKCS1-v1_5, what is k if I'm using ElGamal?

mod p ~ mod n

-- 
marko



Received: from hoffman.proper.com (localhost [127.0.0.1]) by hoffman.proper.com (8.14.4/8.14.3) with ESMTP id o5OHTlVe080697 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Jun 2010 10:29:47 -0700 (MST) (envelope-from owner-ietf-openpgp@mail.imc.org)
Received: (from majordom@localhost) by hoffman.proper.com (8.14.4/8.13.5/Submit) id o5OHTlv4080696; Thu, 24 Jun 2010 10:29:47 -0700 (MST) (envelope-from owner-ietf-openpgp@mail.imc.org)
X-Authentication-Warning: hoffman.proper.com: majordom set sender to owner-ietf-openpgp@mail.imc.org using -f
Received: from mail.mainstreetsoftworks.com (mail.mainstreetsoftworks.com [216.155.111.4]) by hoffman.proper.com (8.14.4/8.14.3) with ESMTP id o5OHTklN080684 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for <ietf-openpgp@imc.org>; Thu, 24 Jun 2010 10:29:47 -0700 (MST) (envelope-from brian@monetra.com)
Received: from localhost (shop.monetra.com [216.155.101.90]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mainstreetsoftworks.com (Postfix) with ESMTPSA id 1DFB484402F for <ietf-openpgp@imc.org>; Thu, 24 Jun 2010 13:29:40 -0400 (EDT)
Date: Thu, 24 Jun 2010 13:31:19 -0400
From: Brian Lewis <brian@monetra.com>
To: ietf-openpgp@imc.org
Subject: ElGamal, EME-PKCS1-v1_5
Message-ID: <20100624173119.GJ25604@brian.internal.monetra.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-monetra-com-MailScanner-Information: Please contact the ISP for more information
X-monetra-com-MailScanner-ID: 1DFB484402F.A2D5F
X-monetra-com-MailScanner: Found to be clean
X-monetra-com-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-8.899, required 4.7, ALL_TRUSTED -1.80, BAYES_00 -2.60, USER_IN_WHITELIST -4.50)
X-monetra-com-MailScanner-From: brian@monetra.com
X-Spam-Status: No
Sender: owner-ietf-openpgp@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-openpgp/mail-archive/>
List-Unsubscribe: <mailto:ietf-openpgp-request@imc.org?body=unsubscribe>
List-ID: <ietf-openpgp.imc.org>

I'm trying to generate a tag 1 (public-key encrypted session key)
packet.

I'm using ElGamal, so the algorithm-specific fields are, according to
http://tools.ietf.org/html/rfc4880#section-5.1,
MPI g**k mod p
MPI m * y**k mod p

So I need m = EME-PKCS1-v1_5(...). According to
http://tools.ietf.org/html/rfc3447#section-7.2.1, PS is k - mLen
- 3 random nonzero bytes, where k is the length of RSA n in bytes. But I
don't have RSA n. I have ElGamal p, g, and y.

In EME-PKCS1-v1_5, what is k if I'm using ElGamal?

Thank you.


