Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

You seek to shield those you love and you like the role of the provider.


sci / sci.crypt / Re: fun with nonces

SubjectAuthor
* fun with noncesStefan Claas
+* Re: fun with noncesRich
|`* Re: fun with noncesStefan Claas
| `* Re: fun with noncesRich
|  `* Re: fun with noncesStefan Claas
|   `* Re: fun with noncesRich
|    `- Re: fun with noncesStefan Claas
+* Re: fun with noncesChax Plore
|`* Re: fun with noncesStefan Claas
| `* Re: fun with noncesRich
|  `* Re: fun with noncesStefan Claas
|   `- Re: fun with noncesStefan Claas
`* Re: fun with noncesChris M. Thomasson
 `* Re: fun with noncesStefan Claas
  `* Re: fun with noncesChris M. Thomasson
   `* Re: fun with noncesStefan Claas
    `* Re: fun with noncesStefan Claas
     +- Re: fun with noncesStefan Claas
     `* Re: fun with noncesStefan Claas
      `- Re: fun with noncesStefan Claas

1
Subject: fun with nonces
From: Stefan Claas
Newsgroups: sci.crypt
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Date: Thu, 4 Jul 2024 17:47 UTC
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: fun with nonces
Date: Thu, 4 Jul 2024 17:47:06 -0000
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Message-ID: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org>
MIME-Version: 1.0
Injection-Date: Thu, 4 Jul 2024 17:47:28 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2153315"; mail-complaints-to="usenet@i2pn2.org";
posting-account="ieSrCjSDShpZNyqIW52mlwIkg76Hsp+TOOO6KTdfCN8";
User-Agent: flnews/1.3.0pre4 (for GNU/Linux)
X-Ed25519-Sig: 0b3a011333caae7bca196cded3ee70a22f9e1180ced17cae19b4ce453f1a02b5
5160b0528a4564c2397a83ee4b8cadd66bfcd0d46532d4fab1619c7cb7787909
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Ed25519-Pub: 43e6681c5cf3cdc2f9ccf975f8a01b18c5e84bf0ba00605faba9cc0f8757a117
X-Finger: tilde.club/~pollux/
X-Date: It's Thu 11265 Sep 1993 07:47:06 PM CEST, the September that never ends
View all headers

Let's assume Bob travels a lot and he wishes to
communicate encrypted with Alice, while using an
encryption program which uses a nonce as additional
input parameter.

He does not need to send Alice the nonces, once he
arrived, because they both have a shared secret.
Alice and Bob can generate them by themselves, no
matter what timezone they are in and the nonces will
be random and can be re-generated with the same values
again, per day.

https://github.com/stefanclaas/nfs

I Have to do a README which explains this scenario
a bit. Hope you like the idea!

--
Regards
Stefan

Subject: Re: fun with nonces
From: Rich
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Fri, 5 Jul 2024 04:13 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: rich@example.invalid (Rich)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Fri, 5 Jul 2024 04:13:16 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <v67rss$34v76$1@dont-email.me>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org>
Injection-Date: Fri, 05 Jul 2024 06:13:17 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="71c304bcd7df0abfbb7c3c334a033484";
logging-data="3308774"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+R7f3LSGFib01K4A9A43Sz"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Cancel-Lock: sha1:ZgPrnOapBHApwA6IAfShJ5kyCi0=
View all headers

Stefan Claas <pollux@tilde.club> wrote:
> He does not need to send Alice the nonces, once he
> arrived, because they both have a shared secret.
> Alice and Bob can generate them by themselves, no
> matter what timezone they are in and the nonces will
> be random and can be re-generated with the same values

They cannot be simultaneously "random" and be capable of being
"re-generated with the same values".

At best, they are psudeo-random. And, looking over the code, indeed,
they are generated from a psudeo-random generator, go's 'rand'.

> https://github.com/stefanclaas/nfs

Not the best choice in acronym, as 'nfs' is already quite well known in
tech circles as "Network File System".

Subject: Re: fun with nonces
From: Stefan Claas
Newsgroups: sci.crypt
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Date: Fri, 5 Jul 2024 14:23 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Fri, 5 Jul 2024 14:23:41 -0000
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Message-ID: <1e2177bc9762cbdbd5898f77326a7d96d233b60b@i2pn2.org>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org> <v67rss$34v76$1@dont-email.me>
MIME-Version: 1.0
Injection-Date: Fri, 5 Jul 2024 14:23:42 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2247739"; mail-complaints-to="usenet@i2pn2.org";
posting-account="ieSrCjSDShpZNyqIW52mlwIkg76Hsp+TOOO6KTdfCN8";
User-Agent: flnews/1.3.0pre4 (for GNU/Linux)
X-Ed25519-Sig: 63ffb734e0f78027af23d9f58f229da44d872d3b638439c1e459885aad2326d9
6a97d9b4e835c6fa249f3d82414f671103cc0a0177aee96c2e6560b2fd251c0b
X-Finger: tilde.club/~pollux/
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Date: It's Fri 11266 Sep 1993 04:23:41 PM CEST, the September that never ends
X-Ed25519-Pub: 43e6681c5cf3cdc2f9ccf975f8a01b18c5e84bf0ba00605faba9cc0f8757a117
View all headers

Rich wrote:
> Stefan Claas <pollux@tilde.club> wrote:
> > He does not need to send Alice the nonces, once he
> > arrived, because they both have a shared secret.
> > Alice and Bob can generate them by themselves, no
> > matter what timezone they are in and the nonces will
> > be random and can be re-generated with the same values
>
> They cannot be simultaneously "random" and be capable of being
> "re-generated with the same values".
>
> At best, they are psudeo-random. And, looking over the code, indeed,
> they are generated from a psudeo-random generator, go's 'rand'.

It uses now xorshift128+ instead of math.rand, to have a 128bit
seed instead of 64bit.
> > https://github.com/stefanclaas/nfs
>
> Not the best choice in acronym, as 'nfs' is already quite well known in
> tech circles as "Network File System".

I know, but I keep the name unless there is a standard Linux or Windows
command with the same name.

--
Regards
Stefan

Subject: Re: fun with nonces
From: Rich
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Fri, 5 Jul 2024 16:02 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: rich@example.invalid (Rich)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Fri, 5 Jul 2024 16:02:57 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <v695fh$3bim4$1@dont-email.me>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org> <v67rss$34v76$1@dont-email.me> <1e2177bc9762cbdbd5898f77326a7d96d233b60b@i2pn2.org>
Injection-Date: Fri, 05 Jul 2024 18:02:57 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="71c304bcd7df0abfbb7c3c334a033484";
logging-data="3525316"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185jToCoVoOA3SlwzRRRiiw"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Cancel-Lock: sha1:11PUC5YahiYIVyBaNeRvmQyyT3Q=
View all headers

Stefan Claas <pollux@tilde.club> wrote:
> Rich wrote:
>> Stefan Claas <pollux@tilde.club> wrote:
>> > He does not need to send Alice the nonces, once he
>> > arrived, because they both have a shared secret.
>> > Alice and Bob can generate them by themselves, no
>> > matter what timezone they are in and the nonces will
>> > be random and can be re-generated with the same values
>>
>> They cannot be simultaneously "random" and be capable of being
>> "re-generated with the same values".
>>
>> At best, they are psudeo-random. And, looking over the code, indeed,
>> they are generated from a psudeo-random generator, go's 'rand'.
>
> It uses now xorshift128+ instead of math.rand, to have a 128bit
> seed instead of 64bit.

And it is still psudeo-random.

>> > https://github.com/stefanclaas/nfs
>>
>> Not the best choice in acronym, as 'nfs' is already quite well known in
>> tech circles as "Network File System".
>
> I know, but I keep the name unless there is a standard Linux or Windows
> command with the same name.

That is your choice, just be prepared for lots of confusion on the part
of others.

Subject: Re: fun with nonces
From: Stefan Claas
Newsgroups: sci.crypt
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Date: Fri, 5 Jul 2024 17:33 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Fri, 5 Jul 2024 17:33:30 -0000
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Message-ID: <50be77cbbdee3fcf1ab27e15586ede96bbf2e710@i2pn2.org>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org> <v67rss$34v76$1@dont-email.me> <1e2177bc9762cbdbd5898f77326a7d96d233b60b@i2pn2.org> <v695fh$3bim4$1@dont-email.me>
MIME-Version: 1.0
Injection-Date: Fri, 5 Jul 2024 17:33:52 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2264008"; mail-complaints-to="usenet@i2pn2.org";
posting-account="ieSrCjSDShpZNyqIW52mlwIkg76Hsp+TOOO6KTdfCN8";
User-Agent: flnews/1.3.0pre4 (for GNU/Linux)
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Date: It's Fri 11266 Sep 1993 07:33:30 PM CEST, the September that never ends
X-Ed25519-Pub: 43e6681c5cf3cdc2f9ccf975f8a01b18c5e84bf0ba00605faba9cc0f8757a117
X-Finger: tilde.club/~pollux/
X-Ed25519-Sig: 63e992192c456dc706a507411ffd7b97c55244bc55e227e074ffd8710b295c3a
0cacde6c79a9632e9d5685090bd422e1cedf8ab91c50d2942cca353639ddac04
View all headers

Rich wrote:
> Stefan Claas <pollux@tilde.club> wrote:
> > Rich wrote:
> > > Stefan Claas <pollux@tilde.club> wrote:
> > > > He does not need to send Alice the nonces, once he
> > > > arrived, because they both have a shared secret.
> > > > Alice and Bob can generate them by themselves, no
> > > > matter what timezone they are in and the nonces will
> > > > be random and can be re-generated with the same values
> > >
> > > They cannot be simultaneously "random" and be capable of being
> > > "re-generated with the same values".
> > >
> > > At best, they are psudeo-random. And, looking over the code, indeed,
> > > they are generated from a psudeo-random generator, go's 'rand'.
> >
> > It uses now xorshift128+ instead of math.rand, to have a 128bit
> > seed instead of 64bit.
>
> And it is still psudeo-random.

And that is perfectly fine, unless of course someone here would show
me a better solution, for using nonces without transmitting them.

--
Regards
Stefan

Subject: Re: fun with nonces
From: Chax Plore
Newsgroups: sci.crypt
Organization: i2pn2 (i2pn.org)
Date: Fri, 5 Jul 2024 17:40 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: ftilojim@tznvy.pbz (Chax Plore)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Fri, 5 Jul 2024 19:40:44 +0200
Organization: i2pn2 (i2pn.org)
Message-ID: <45eed9a6-8bc6-7595-a183-82d25eaea562@tznvy.pbz>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org>
Reply-To: ftilojim@tznvy.pbz
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: i2pn2.org;
logging-data="2264599"; mail-complaints-to="usenet@i2pn2.org";
posting-account="5D73dK+H7GjKFvIMhrW+/Y4rYhlPmfLmJxEmTeWyt8M";
To: Stefan Claas <pollux@tilde.club>
In-Reply-To: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org>
X-Spam-Checker-Version: SpamAssassin 4.0.0
Content-Language: en-GB
View all headers

Xorshift is reversible, so if Eve is up to no good, then she can use the
foreknowledge of nonce in bad way (no specific attack in mind, but
nothing in the message should be predictable or "crackable").

I suggest to use HKDF instead to generate the nonce in your scheme,
which I would name "nonce ratchet" instead of confusing "nfs" (I'm just
looking on my NAS console, where I see two volumes mounted as NFS shares).

And If you are already using KKDF, they why not to "ratchet" the whole
key/nonce/iv/salt material this way, if you intend to leave no variables
in plain sight?

On 2024-07-04 19:47, Stefan Claas wrote:
> Let's assume Bob travels a lot and he wishes to
> communicate encrypted with Alice, while using an
> encryption program which uses a nonce as additional
> input parameter.
>
> He does not need to send Alice the nonces, once he
> arrived, because they both have a shared secret.
> Alice and Bob can generate them by themselves, no
> matter what timezone they are in and the nonces will
> be random and can be re-generated with the same values
> again, per day.
>
> https://github.com/stefanclaas/nfs
>
> I Have to do a README which explains this scenario
> a bit. Hope you like the idea!
>

--

-----BEGIN PGP PUBLIC KEY FINGERPRINT-----
5745 807C 2B82 14D8 AB06 422C 8876 5DFC 2A51 778C
------END PGP PUBLIC KEY FINGERPRINT------

Subject: Re: fun with nonces
From: Stefan Claas
Newsgroups: sci.crypt
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Date: Fri, 5 Jul 2024 19:07 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Fri, 5 Jul 2024 19:07:09 -0000
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Message-ID: <1b27e538bafdad0e747aca40b12139a844576240@i2pn2.org>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org> <45eed9a6-8bc6-7595-a183-82d25eaea562@tznvy.pbz>
MIME-Version: 1.0
Injection-Date: Fri, 5 Jul 2024 19:07:31 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2271156"; mail-complaints-to="usenet@i2pn2.org";
posting-account="ieSrCjSDShpZNyqIW52mlwIkg76Hsp+TOOO6KTdfCN8";
User-Agent: flnews/1.3.0pre4 (for GNU/Linux)
X-Ed25519-Pub: 43e6681c5cf3cdc2f9ccf975f8a01b18c5e84bf0ba00605faba9cc0f8757a117
X-Date: It's Fri 11266 Sep 1993 09:07:09 PM CEST, the September that never ends
X-Finger: tilde.club/~pollux/
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Ed25519-Sig: e542c4bfb76263920816f76cc659cbf6b0a6faacc7e06bca17474f6e0953543a
ce572bbeff184da4dd17377cf2a96938c01fd8def7bf206690227957fc461202
View all headers

Chax Plore wrote:
>
> Xorshift is reversible, so if Eve is up to no good, then she can use the
> foreknowledge of nonce in bad way (no specific attack in mind, but
> nothing in the message should be predictable or "crackable").
>
> I suggest to use HKDF instead to generate the nonce in your scheme,
> which I would name "nonce ratchet" instead of confusing "nfs" (I'm just
> looking on my NAS console, where I see two volumes mounted as NFS shares).

Thanks for your valuable input, much appreciated! The Program uses now
hkdf, instead of corshift128+.
> And If you are already using KKDF, they why not to "ratchet" the whole
> key/nonce/iv/salt material this way, if you intend to leave no variables
> in plain sight?

What do you mean (language barrier)?

--
Regards
Stefan

Subject: Re: fun with nonces
From: Rich
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Fri, 5 Jul 2024 19:44 UTC
References: 1 2 3 4 5
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: rich@example.invalid (Rich)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Fri, 5 Jul 2024 19:44:10 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <v69iea$3djqs$1@dont-email.me>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org> <v67rss$34v76$1@dont-email.me> <1e2177bc9762cbdbd5898f77326a7d96d233b60b@i2pn2.org> <v695fh$3bim4$1@dont-email.me> <50be77cbbdee3fcf1ab27e15586ede96bbf2e710@i2pn2.org>
Injection-Date: Fri, 05 Jul 2024 21:44:11 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="71c304bcd7df0abfbb7c3c334a033484";
logging-data="3592028"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19TtKxSyG1SDXGG3tjHkOiD"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Cancel-Lock: sha1:F4K8RKnjfUs0+o6/rRTUDWJ3czs=
View all headers

Stefan Claas <pollux@tilde.club> wrote:
> Rich wrote:
>> Stefan Claas <pollux@tilde.club> wrote:
>> > Rich wrote:
>> > > Stefan Claas <pollux@tilde.club> wrote:
>> > > > He does not need to send Alice the nonces, once he
>> > > > arrived, because they both have a shared secret.
>> > > > Alice and Bob can generate them by themselves, no
>> > > > matter what timezone they are in and the nonces will
>> > > > be random and can be re-generated with the same values
>> > >
>> > > They cannot be simultaneously "random" and be capable of being
>> > > "re-generated with the same values".
>> > >
>> > > At best, they are psudeo-random. And, looking over the code, indeed,
>> > > they are generated from a psudeo-random generator, go's 'rand'.
>> >
>> > It uses now xorshift128+ instead of math.rand, to have a 128bit
>> > seed instead of 64bit.
>>
>> And it is still psudeo-random.
>
> And that is perfectly fine, unless of course someone here would show
> me a better solution, for using nonces without transmitting them.

There is really no need for "shared secret nonces" given standard
encryption modes. The 'nonce' (meaning: "used once" [1]) is present to
randomize a given use of a mode [2] under the same key and plaintext as
a prior use of the same mode/plaintext [3] under the same key. The only
'security' required of the nonce is that eve not be able to predict any
given nonce in advance, which is why they are preferably derived from
true random sources or created by cryptography secure random number
generation algorithms (with a good true randomness seed). But the
security of the encrypted data does not depend upon the actual nonce
being secret to Eve. This is why they are transmitted in the clear at
the start of modes that use a nonce.

But going to great length to generate "secret" nonce's for use by Bob
and Alice is unnecessary.

You appear to be beginning to climb down the same rabbit hole that
Chris quite deeply entered when he was so overly concerned about the
IV/Nonce being in the clear as part of the protocol that Eve got to
examine some years back.

[1] https://www.merriam-webster.com/dictionary/nonce

[2] i.e.: CBC, CFB, CTR, etc)

[3] note that in many encrypted protocols there will often be some
constant plaintext in the underlying message such that without the
randomizing provided by the nonce, a known-plaintext attack can be
performed on those parts of the underlying message.

Subject: Re: fun with nonces
From: Rich
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Fri, 5 Jul 2024 19:46 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: rich@example.invalid (Rich)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Fri, 5 Jul 2024 19:46:51 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <v69ijb$3djqs$2@dont-email.me>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org> <45eed9a6-8bc6-7595-a183-82d25eaea562@tznvy.pbz> <1b27e538bafdad0e747aca40b12139a844576240@i2pn2.org>
Injection-Date: Fri, 05 Jul 2024 21:46:52 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="71c304bcd7df0abfbb7c3c334a033484";
logging-data="3592028"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+NBJROSODch1MNoeOT8oGS"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Cancel-Lock: sha1:KLUJx780oUrijdwgUZcwVJDkJfE=
View all headers

Stefan Claas <pollux@tilde.club> wrote:
> Chax Plore wrote:
>>
>> Xorshift is reversible, so if Eve is up to no good, then she can use
>> the foreknowledge of nonce in bad way (no specific attack in mind,
>> but nothing in the message should be predictable or "crackable").
>>
>> I suggest to use HKDF instead to generate the nonce in your scheme,
>> which I would name "nonce ratchet" instead of confusing "nfs" (I'm
>> just looking on my NAS console, where I see two volumes mounted as
>> NFS shares).
>
> Thanks for your valuable input, much appreciated! The Program uses
> now hkdf, instead of corshift128+.
>
>> And If you are already using KKDF, they why not to "ratchet" the
>> whole key/nonce/iv/salt material this way, if you intend to leave no
>> variables in plain sight?
>
> What do you mean (language barrier)?

If I got Chax's meaning properly, the statement is:

Why not use this scheme to generate all of the "key", "nonce", "iv",
and "salt" such that all four change with each new message
(effectively making the four a large 'key' of sorts)?

Subject: Re: fun with nonces
From: Stefan Claas
Newsgroups: sci.crypt
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Date: Fri, 5 Jul 2024 20:06 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Fri, 5 Jul 2024 20:06:53 -0000
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Message-ID: <afc9f7652b10d487109ad81270c4d0d99d9b7392@i2pn2.org>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org> <45eed9a6-8bc6-7595-a183-82d25eaea562@tznvy.pbz> <1b27e538bafdad0e747aca40b12139a844576240@i2pn2.org> <v69ijb$3djqs$2@dont-email.me>
MIME-Version: 1.0
Injection-Date: Fri, 5 Jul 2024 20:06:54 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2275317"; mail-complaints-to="usenet@i2pn2.org";
posting-account="ieSrCjSDShpZNyqIW52mlwIkg76Hsp+TOOO6KTdfCN8";
User-Agent: flnews/1.3.0pre4 (for GNU/Linux)
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Ed25519-Sig: 0c663ad4844f3dcce01c4ecce327d38d484b43b4fc77c8c98288a64efb6a6464
c0bf83f108bbf66972d328670000acfbe4d27096eb007ec06e9bebc593d91b06
X-Finger: tilde.club/~pollux/
X-Ed25519-Pub: 43e6681c5cf3cdc2f9ccf975f8a01b18c5e84bf0ba00605faba9cc0f8757a117
X-Date: It's Fri 11266 Sep 1993 10:06:54 PM CEST, the September that never ends
View all headers

Rich wrote:
> Stefan Claas <pollux@tilde.club> wrote:
> > Chax Plore wrote:
> > >
> > > Xorshift is reversible, so if Eve is up to no good, then she can use
> > > the foreknowledge of nonce in bad way (no specific attack in mind,
> > > but nothing in the message should be predictable or "crackable").
> > >
> > > I suggest to use HKDF instead to generate the nonce in your scheme,
> > > which I would name "nonce ratchet" instead of confusing "nfs" (I'm
> > > just looking on my NAS console, where I see two volumes mounted as
> > > NFS shares).
> >
> > Thanks for your valuable input, much appreciated! The Program uses
> > now hkdf, instead of corshift128+.
> >
> > > And If you are already using KKDF, they why not to "ratchet" the
> > > whole key/nonce/iv/salt material this way, if you intend to leave no
> > > variables in plain sight?
> >
> > What do you mean (language barrier)?
>
> If I got Chax's meaning properly, the statement is:
>
> Why not use this scheme to generate all of the "key", "nonce", "iv",
> and "salt" such that all four change with each new message
> (effectively making the four a large 'key' of sorts)?

Ah, but I only need nonces.

I deleted the repository and created a new one, named nora.
Nora is a female Name and Nora could be a good friend of
Alice and Bob. :-) https://github.com/stefanclaas/nora

--
Regards
Stefan

Subject: Re: fun with nonces
From: Stefan Claas
Newsgroups: sci.crypt
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Date: Fri, 5 Jul 2024 20:17 UTC
References: 1 2 3 4 5 6
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Fri, 5 Jul 2024 20:17:46 -0000
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Message-ID: <c671d9278a8c412de3eceb867e565862f87d34da@i2pn2.org>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org> <v67rss$34v76$1@dont-email.me> <1e2177bc9762cbdbd5898f77326a7d96d233b60b@i2pn2.org> <v695fh$3bim4$1@dont-email.me> <50be77cbbdee3fcf1ab27e15586ede96bbf2e710@i2pn2.org> <v69iea$3djqs$1@dont-email.me>
MIME-Version: 1.0
Injection-Date: Fri, 5 Jul 2024 20:18:07 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2276699"; mail-complaints-to="usenet@i2pn2.org";
posting-account="ieSrCjSDShpZNyqIW52mlwIkg76Hsp+TOOO6KTdfCN8";
User-Agent: flnews/1.3.0pre4 (for GNU/Linux)
X-Ed25519-Pub: 43e6681c5cf3cdc2f9ccf975f8a01b18c5e84bf0ba00605faba9cc0f8757a117
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Finger: tilde.club/~pollux/
X-Date: It's Fri 11266 Sep 1993 10:17:46 PM CEST, the September that never ends
X-Ed25519-Sig: e7c8bf41cfc2ba53433fdf36cb18d0c926ab2605abdcd109625a37eaa494b892
0dd1d38070beec61ccc1638a331e59f2a0903e53f8145b53a7068c1a6dad740b
View all headers

Rich wrote:
> Stefan Claas <pollux@tilde.club> wrote:
> > Rich wrote:
> > > Stefan Claas <pollux@tilde.club> wrote:
> > > > Rich wrote:
> > > > > Stefan Claas <pollux@tilde.club> wrote:
> > > > > > He does not need to send Alice the nonces, once he
> > > > > > arrived, because they both have a shared secret.
> > > > > > Alice and Bob can generate them by themselves, no
> > > > > > matter what timezone they are in and the nonces will
> > > > > > be random and can be re-generated with the same values
> > > > >
> > > > > They cannot be simultaneously "random" and be capable of being
> > > > > "re-generated with the same values".
> > > > >
> > > > > At best, they are psudeo-random. And, looking over the code, indeed,
> > > > > they are generated from a psudeo-random generator, go's 'rand'.
> > > >
> > > > It uses now xorshift128+ instead of math.rand, to have a 128bit
> > > > seed instead of 64bit.
> > >
> > > And it is still psudeo-random.
> >
> > And that is perfectly fine, unless of course someone here would show
> > me a better solution, for using nonces without transmitting them.
>
> There is really no need for "shared secret nonces" given standard
> encryption modes. The 'nonce' (meaning: "used once" [1]) is present to
> randomize a given use of a mode [2] under the same key and plaintext as
> a prior use of the same mode/plaintext [3] under the same key. The only
> 'security' required of the nonce is that eve not be able to predict any
> given nonce in advance, which is why they are preferably derived from
> true random sources or created by cryptography secure random number
> generation algorithms (with a good true randomness seed). But the
> security of the encrypted data does not depend upon the actual nonce
> being secret to Eve. This is why they are transmitted in the clear at
> the start of modes that use a nonce.

I have read quite a bit about nonce usage and agree, but they can be
also pseudo-random.
> But going to great length to generate "secret" nonce's for use by Bob
> and Alice is unnecessary.

Well, known crypto algos don't have to do that, correct! But I like to
use this scheme with Google's Adiantum Encryption, which allows this.

I like Adiantum very much because it is Format Preserving Encryption,
which can be used, besides disk encryption on mobile devices, also for
SMS encryption with feature phones, which is pretty cool and more secure
IMHO than using a smartphone with crypto messengers etc.

> You appear to be beginning to climb down the same rabbit hole that
> Chris quite deeply entered when he was so overly concerned about the
> IV/Nonce being in the clear as part of the protocol that Eve got to
> examine some years back.

No, see above and instead of sending them in advance why not generate
them on the fly, for each day and then use them, without sending, along
with a 256 bit key.

--
Regards
Stefan

Subject: Re: fun with nonces
From: Chris M. Thomasson
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Fri, 5 Jul 2024 20:34 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Fri, 5 Jul 2024 13:34:18 -0700
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <v69lcb$3e2hf$1@dont-email.me>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 05 Jul 2024 22:34:20 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="76186ae1836e352550e5f273f398ee5d";
logging-data="3607087"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Zly2kYoqfRxc1FjlQzFUnsQb6VyRygFk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:yNiLKZq7jNbGSvyBgdWBJFVyp/c=
Content-Language: en-US
In-Reply-To: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org>
View all headers

On 7/4/2024 10:47 AM, Stefan Claas wrote:
> Let's assume Bob travels a lot and he wishes to
> communicate encrypted with Alice, while using an
> encryption program which uses a nonce as additional
> input parameter.
>
> He does not need to send Alice the nonces, once he
> arrived, because they both have a shared secret.
> Alice and Bob can generate them by themselves, no
> matter what timezone they are in and the nonces will
> be random and can be re-generated with the same values
> again, per day.
>
> https://github.com/stefanclaas/nfs
>
> I Have to do a README which explains this scenario
> a bit. Hope you like the idea!
>

Hopefully the nonces were created by a TRNG such that they cannot be
repeated expect by pure chance... Fair enough?

Every PRNG has a period and a way to set the starting point.

Subject: Re: fun with nonces
From: Stefan Claas
Newsgroups: sci.crypt
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Date: Fri, 5 Jul 2024 20:46 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Fri, 5 Jul 2024 20:46:33 -0000
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Message-ID: <1de7695e68c4ca5bb4a87cc8d879a540480d9944@i2pn2.org>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org> <v69lcb$3e2hf$1@dont-email.me>
MIME-Version: 1.0
Injection-Date: Fri, 5 Jul 2024 20:46:34 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2278774"; mail-complaints-to="usenet@i2pn2.org";
posting-account="ieSrCjSDShpZNyqIW52mlwIkg76Hsp+TOOO6KTdfCN8";
User-Agent: flnews/1.3.0pre4 (for GNU/Linux)
X-Ed25519-Sig: 412b63f3c8b5644a70724d622dcf5d3eca56635cdd1509963e7d07338302991b
1b3ae0c2c317febafa09aeceaf83111ab4433c18b28fcd3000ab83f6fe54b705
X-Finger: tilde.club/~pollux/
X-Date: It's Fri 11266 Sep 1993 10:46:33 PM CEST, the September that never ends
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Ed25519-Pub: 43e6681c5cf3cdc2f9ccf975f8a01b18c5e84bf0ba00605faba9cc0f8757a117
View all headers

Chris M. Thomasson wrote:
> On 7/4/2024 10:47 AM, Stefan Claas wrote:
> > Let's assume Bob travels a lot and he wishes to
> > communicate encrypted with Alice, while using an
> > encryption program which uses a nonce as additional
> > input parameter.
> >
> > He does not need to send Alice the nonces, once he
> > arrived, because they both have a shared secret.
> > Alice and Bob can generate them by themselves, no
> > matter what timezone they are in and the nonces will
> > be random and can be re-generated with the same values
> > again, per day.
> >
> > https://github.com/stefanclaas/nfs
> >
> > I Have to do a README which explains this scenario
> > a bit. Hope you like the idea!
> >
>
> Hopefully the nonces were created by a TRNG such that they cannot be
> repeated expect by pure chance... Fair enough?
>
> Every PRNG has a period and a way to set the starting point.

Well, they can be also pseudo-random. Mine are deterministic,
based on a passphrase and date while using hkdf.

--
Regards
Stefan

Subject: Re: fun with nonces
From: Stefan Claas
Newsgroups: sci.crypt
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Date: Sat, 6 Jul 2024 08:22 UTC
References: 1 2 3 4 5
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Sat, 6 Jul 2024 08:22:03 -0000
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Message-ID: <2f9052258fb7b5a518a49d49b0469db30ed23e29@i2pn2.org>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org> <45eed9a6-8bc6-7595-a183-82d25eaea562@tznvy.pbz> <1b27e538bafdad0e747aca40b12139a844576240@i2pn2.org> <v69ijb$3djqs$2@dont-email.me> <afc9f7652b10d487109ad81270c4d0d99d9b7392@i2pn2.org>
MIME-Version: 1.0
Injection-Date: Sat, 6 Jul 2024 08:22:03 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2329705"; mail-complaints-to="usenet@i2pn2.org";
posting-account="ieSrCjSDShpZNyqIW52mlwIkg76Hsp+TOOO6KTdfCN8";
User-Agent: flnews/1.3.0pre4 (for GNU/Linux)
X-Finger: tilde.club/~pollux/
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Ed25519-Pub: 43e6681c5cf3cdc2f9ccf975f8a01b18c5e84bf0ba00605faba9cc0f8757a117
X-Ed25519-Sig: 753598d8cf6ba1448c937c0da8a990f63d9e5b19f2ed6680151cbd9703146ccd
5b2f5dab7874820e2fd4a4b0aeddd6a4c8abedec634de55164ce38e4c1171806
X-Date: It's Sat 11267 Sep 1993 10:22:03 AM CEST, the September that never ends
View all headers

Stefan Claas wrote:
> I deleted the repository and created a new one, named nora.
> Nora is a female Name and Nora could be a good friend of
> Alice and Bob. :-) https://github.com/stefanclaas/nora

Optional -b flag added for 'party B', so that when Alice and
Bob would send a message at the same time, using the same nonce
is prevented. With the -b flag the hash value is incremented
by one.

--
Regards
Stefan

Subject: Re: fun with nonces
From: Chris M. Thomasson
Newsgroups: sci.crypt
Organization: A noiseless patient Spider
Date: Sun, 7 Jul 2024 20:03 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Sun, 7 Jul 2024 13:03:44 -0700
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <v6esb0$f604$1@dont-email.me>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org>
<v69lcb$3e2hf$1@dont-email.me>
<1de7695e68c4ca5bb4a87cc8d879a540480d9944@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 07 Jul 2024 22:03:45 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="0ecdb18ed35c2abf38d5c9c78345642e";
logging-data="497668"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX197KG67SzEEGEOZbi+yvEUse+MTIATK4wg="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:xbVCbaqpdPNg4ebXHr9t1eo+sYo=
In-Reply-To: <1de7695e68c4ca5bb4a87cc8d879a540480d9944@i2pn2.org>
Content-Language: en-US
View all headers

On 7/5/2024 1:46 PM, Stefan Claas wrote:
> Chris M. Thomasson wrote:
>> On 7/4/2024 10:47 AM, Stefan Claas wrote:
>>> Let's assume Bob travels a lot and he wishes to
>>> communicate encrypted with Alice, while using an
>>> encryption program which uses a nonce as additional
>>> input parameter.
>>>
>>> He does not need to send Alice the nonces, once he
>>> arrived, because they both have a shared secret.
>>> Alice and Bob can generate them by themselves, no
>>> matter what timezone they are in and the nonces will
>>> be random and can be re-generated with the same values
>>> again, per day.
>>>
>>> https://github.com/stefanclaas/nfs
>>>
>>> I Have to do a README which explains this scenario
>>> a bit. Hope you like the idea!
>>>
>>
>> Hopefully the nonces were created by a TRNG such that they cannot be
>> repeated expect by pure chance... Fair enough?
>>
>> Every PRNG has a period and a way to set the starting point.
>
> Well, they can be also pseudo-random. Mine are deterministic,
> based on a passphrase and date while using hkdf.
>

Can somebody try to get at things where they can gain educated guesses
at your schedule, so to speak?

Subject: Re: fun with nonces
From: Stefan Claas
Newsgroups: sci.crypt
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Date: Sun, 7 Jul 2024 21:01 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Sun, 7 Jul 2024 21:01:49 -0000
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Message-ID: <ce90d5f357361a8628bcc85d2f33cff1163c3bea@i2pn2.org>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org> <v69lcb$3e2hf$1@dont-email.me> <1de7695e68c4ca5bb4a87cc8d879a540480d9944@i2pn2.org> <v6esb0$f604$1@dont-email.me>
MIME-Version: 1.0
Injection-Date: Sun, 7 Jul 2024 21:02:11 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2503466"; mail-complaints-to="usenet@i2pn2.org";
posting-account="ieSrCjSDShpZNyqIW52mlwIkg76Hsp+TOOO6KTdfCN8";
User-Agent: flnews/1.3.0pre4 (for GNU/Linux)
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Date: It's Sun 11268 Sep 1993 11:01:49 PM CEST, the September that never ends
X-Ed25519-Pub: c0ffee5a36e581eb10f60b2831b3cdb955d2e7ef680dd282a8d43ad8b84b357a
X-Finger: tilde.club/~pollux/
X-Ed25519-Sig: 8fba25a1d3bfa1242f96c36b46fa7a1d3470e1a74640e74ae81c8fbcdec17033
37bc17196e15da42a9836ee9577f811c605564a482f4f71935cdeb838ee7d60b
View all headers

Chris M. Thomasson wrote:
> On 7/5/2024 1:46 PM, Stefan Claas wrote:

> > > Hopefully the nonces were created by a TRNG such that they cannot be
> > > repeated expect by pure chance... Fair enough?
> > >
> > > Every PRNG has a period and a way to set the starting point.
> >
> > Well, they can be also pseudo-random. Mine are deterministic,
> > based on a passphrase and date while using hkdf.
> >
>
> Can somebody try to get at things where they can gain educated guesses
> at your schedule, so to speak?

For the nonce only, without using a cipher, I would say no, because Alice
and Bob have a shared secret, which is used along with a date (only day,
not time and as UTC timezone) and nor Alice or Bob have to send the nonces
to each other, so that encryption and decription, with, for example, my
Adiantum implemention works nicely.

Here is an example: Let's say Bob is in Germany, as of today, with current
time 22:41 CET and he sends an encrypted message with Adiantum now to Alice.
Alice, in the U.S., much earlier time, because of the different timezone,
simply runs nora[1] with Adiantum[2] and can be sure that when she creates
*todays* nonce(s) that the message will decrypt, because of UTC timezone
used in nora.

A sample run with nora looks like this:

$ nora
Usage: -p <password> [-b party B] [-n number of nonces] [-l length of the nonce]
[-s save nonces]

So Bob, as of today and now, runs nora with the shared secret 'test'
and the output will be:

$ nora -p test -n 10
1: 2aba3cbd0f2435c1231d7acd897f33b6 20240707
2: fd1cf73718ace13892282ce1c85079c0 20240707
3: 8c7bb448faeb2bc2886a13e29acd70cc 20240707
4: c8e80e0e6a56a150a6497df6669e0299 20240707
5: 691078499be8e87922a6c5e28f0a80a2 20240707
6: 944214f54301641f0c267f3aaf44d001 20240707
7: 5959b96219a2d6a56b05a04a4ed01b87 20240707
8: ebfc1313981df46d0f3326e7eacdb738 20240707
9: de155347f93107b8367ce0ff8e3f473b 20240707
10: b81c73bcbc173b5e15b597bfeb8e5541 20240707

Bob can re-run nora later and the same nonces will be generated
for today.

Alice, as receiver of the encrypted message, would then reply with
nonces using the -b paramter, to prevent that the same nonce is
used, in case they both would send a message at the same time.

As you can see from the output the hex values, which are not
exchanged, they leave, I would say, no information, about my
schedule.

I believe that this scheme is secure enough when using it,
for example, with Adiantum and allows Alice and Bob not to
worry about nonce creation, which they do not want to send
to each other and it is also easy to use and to understand.

[1] https://github.com/stefanclaas/nora
[2] https:/github.com/stefanclaas/adiantum

--
Regards
Stefan

Subject: Re: fun with nonces
From: Stefan Claas
Newsgroups: sci.crypt
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Date: Mon, 8 Jul 2024 18:35 UTC
References: 1 2 3 4 5
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Mon, 8 Jul 2024 18:35:12 -0000
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Message-ID: <84b011b66803d4588ad5a76a6ddb5b09bfe15aad@i2pn2.org>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org> <v69lcb$3e2hf$1@dont-email.me> <1de7695e68c4ca5bb4a87cc8d879a540480d9944@i2pn2.org> <v6esb0$f604$1@dont-email.me> <ce90d5f357361a8628bcc85d2f33cff1163c3bea@i2pn2.org>
MIME-Version: 1.0
Injection-Date: Mon, 8 Jul 2024 18:35:36 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2602634"; mail-complaints-to="usenet@i2pn2.org";
posting-account="ieSrCjSDShpZNyqIW52mlwIkg76Hsp+TOOO6KTdfCN8";
User-Agent: flnews/1.3.0pre4 (for GNU/Linux)
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Ed25519-Pub: 312ee6324efd5b1707491dc32621c5c88d24994a6b6eb60beffb3b13f0142031
X-Finger: tilde.club/~pollux/
X-Ed25519-Sig: e5965073a72657ac9293f39389178e7f7a9fefc8112f84de437afc96d7aa9485
80cc6e80d814ae3e9fdf3e4211e88fa0031c1d74278447f39ff3ecf1ad87640e
X-Date: It's Mon 11269 Sep 1993 08:35:12 PM CEST, the September that never ends
View all headers

Stefan Claas wrote:
> I believe that this scheme is secure enough when using it,
> for example, with Adiantum and allows Alice and Bob not to
> worry about nonce creation, which they do not want to send
> to each other and it is also easy to use and to understand.
>
> [1] https://github.com/stefanclaas/nora
> [2] https://github.com/stefanclaas/adiantum

A sample run of nora, Adiantum and Argon2id (for a deterministic
256 bit key):

$ argon2id -p test -s test -w key
(a26b1128e1240639f2379b66fc56ea00a0e93e976aade1227cc5b34b38d00a82)

$ nora -p test -n 10 -s
1: ad0cbbf918830532d767c8a480495cdc 20240708
2: 26976ec2d08a91b1db184f40deae2128 20240708
3: e825c6ce7b0a3abd7ccba70035a445c4 20240708
4: 1dcf05c05761384313be893293e05348 20240708
5: 00b601719fe6a69bd3e475177a9d1d8c 20240708
6: ee4eaa08a04ee004228b35f05a24dfc2 20240708
7: 275ce7188f08be7c289fb017dfb7edcf 20240708
8: 2d39733a7336d33f7b806f7a3e79fea6 20240708
9: f7e9275ddba627fc8a48b3ca71ac91e9 20240708
10: 8659306f69634b7127bdf3701c887747 20240708

$ echo -n 'Hi Alice, I arrived today at 06:00 PM.' | adiantum key
n-1 > msg_enc.txt

$ hexdump -Cv msg.txt
00000000 48 69 20 41 6c 69 63 65 2c 20 49 20 61 72 72 69 |Hi Alice, I arri|
00000010 76 65 64 20 74 6f 64 61 79 20 61 74 20 30 36 3a |ved today at 06:|
00000020 30 30 20 50 4d 2e |00 PM.|
00000026

$ hexdump -Cv msg_enc.txt
00000000 d7 74 06 ca 73 bd a2 07 38 cb 80 0a 73 62 79 d6 |.t..s...8...sby.|
00000010 d4 89 96 a5 ff 5e f6 ba 4e 13 e0 a0 93 f8 81 88 |.....^..N.......|
00000020 c0 bb a3 a8 a8 42 |.....B|
00000026

As one can see FPE (Format Preserving Encryption) is pretty cool,
because one can use it with a base26 encoder for SMS messages,
with an old feature phone and a cute GPD MicroPC and does not
need a smartphone, which can be easily compromised with Pegasus etc.

--
Regards
Stefan

Subject: Re: fun with nonces
From: Stefan Claas
Newsgroups: sci.crypt
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Date: Tue, 9 Jul 2024 14:20 UTC
References: 1 2 3 4 5 6
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Tue, 9 Jul 2024 14:20:45 -0000
Organization: ℭ𝔥𝔦𝔣𝔣𝔯𝔢𝔭𝔲𝔫𝔨𝔰
Message-ID: <f6c7e1c2ee37ee804a12e9aac8e4de2b1213b4d5@i2pn2.org>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org> <v69lcb$3e2hf$1@dont-email.me> <1de7695e68c4ca5bb4a87cc8d879a540480d9944@i2pn2.org> <v6esb0$f604$1@dont-email.me> <ce90d5f357361a8628bcc85d2f33cff1163c3bea@i2pn2.org> <84b011b66803d4588ad5a76a6ddb5b09bfe15aad@i2pn2.org>
MIME-Version: 1.0
Injection-Date: Tue, 9 Jul 2024 14:20:46 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2694565"; mail-complaints-to="usenet@i2pn2.org";
posting-account="ieSrCjSDShpZNyqIW52mlwIkg76Hsp+TOOO6KTdfCN8";
User-Agent: flnews/1.3.0pre4 (for GNU/Linux)
X-Finger: tilde.club/~pollux/
X-Date: It's Tue 11270 Sep 1993 04:20:45 PM CEST, the September that never ends
X-Ed25519-Sig: 1121e82a4630289bc0a6faf7d7a27a3876e2074f39db28b4ea0d389ed575b551
f6bb599a479347f56a305b91c2f187f57f92dedbd4f793cb62e96fa0825e850f
X-Ed25519-Pub: 312ee6324efd5b1707491dc32621c5c88d24994a6b6eb60beffb3b13f0142031
X-Spam-Checker-Version: SpamAssassin 4.0.0
View all headers

Stefan Claas wrote:

> As one can see FPE (Format Preserving Encryption) is pretty cool,
> because one can use it with a base26 encoder for SMS messages,
> with an old feature phone and a cute GPD MicroPC and does not
> need a smartphone, which can be easily compromised with Pegasus etc.

And if used with a burner phone you would have denialable encryption,
when using a Live System, right?

It is even getting better when using above programs with red and sve
to have denialable signing capabilities, when used with a Live Sytem.

https://github.com/stefanclaas/red
https://github.com/stefanclaas/sve

--
Regards
Stefan

Subject: Re: fun with nonces
From: Stefan Claas
Newsgroups: sci.crypt
Organization: Ch1ffr3punk5
Date: Thu, 22 Aug 2024 20:44 UTC
References: 1 2 3 4 5 6
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Thu, 22 Aug 2024 20:44:56 -0000
Organization: Ch1ffr3punk5
Message-ID: <a56604863db79db919dcaab01acfa9fd565129e2@i2pn2.org>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org> <v69lcb$3e2hf$1@dont-email.me> <1de7695e68c4ca5bb4a87cc8d879a540480d9944@i2pn2.org> <v6esb0$f604$1@dont-email.me> <ce90d5f357361a8628bcc85d2f33cff1163c3bea@i2pn2.org> <84b011b66803d4588ad5a76a6ddb5b09bfe15aad@i2pn2.org>
MIME-Version: 1.0
Injection-Date: Thu, 22 Aug 2024 20:44:57 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="3510452"; mail-complaints-to="usenet@i2pn2.org";
posting-account="ieSrCjSDShpZNyqIW52mlwIkg76Hsp+TOOO6KTdfCN8";
User-Agent: flnews/1.3.0pre10 (for GNU/Linux)
X-Ed25519-Sig: ffdc36341de76d80ec8a05ac6f86b500d350ae05ee5f7f3ab5936041666c0d94
05f161bde2efd96cf7bb48d38278327dffd05464240e02e517b02fec75d4f902
X-Ed25519-Pub: c0ffee5a36e581eb10f60b2831b3cdb955d2e7ef680dd282a8d43ad8b84b357a
X-Finger: tilde.club/~pollux/
X-Date: It's Thu 11314 Sep 1993 10:44:56 PM CEST, the September that never ends
X-Spam-Checker-Version: SpamAssassin 4.0.0
View all headers

Stefan Claas wrote:
> Stefan Claas wrote:
> > I believe that this scheme is secure enough when using it,
> > for example, with Adiantum and allows Alice and Bob not to
> > worry about nonce creation, which they do not want to send
> > to each other and it is also easy to use and to understand.
> >
> > [1] https://github.com/stefanclaas/nora
> > [2] https://github.com/stefanclaas/adiantum
>
> A sample run of nora, Adiantum and Argon2id (for a deterministic
> 256 bit key):
>
> $ argon2id -p test -s test -w key
> (a26b1128e1240639f2379b66fc56ea00a0e93e976aade1227cc5b34b38d00a82)
>
> $ nora -p test -n 10 -s
> 1: ad0cbbf918830532d767c8a480495cdc 20240708
> 2: 26976ec2d08a91b1db184f40deae2128 20240708
> 3: e825c6ce7b0a3abd7ccba70035a445c4 20240708
> 4: 1dcf05c05761384313be893293e05348 20240708
> 5: 00b601719fe6a69bd3e475177a9d1d8c 20240708
> 6: ee4eaa08a04ee004228b35f05a24dfc2 20240708
> 7: 275ce7188f08be7c289fb017dfb7edcf 20240708
> 8: 2d39733a7336d33f7b806f7a3e79fea6 20240708
> 9: f7e9275ddba627fc8a48b3ca71ac91e9 20240708
> 10: 8659306f69634b7127bdf3701c887747 20240708
>
> $ echo -n 'Hi Alice, I arrived today at 06:00 PM.' | adiantum key
> n-1 > msg_enc.txt
>
> $ hexdump -Cv msg.txt
> 00000000 48 69 20 41 6c 69 63 65 2c 20 49 20 61 72 72 69 |Hi Alice, I arri|
> 00000010 76 65 64 20 74 6f 64 61 79 20 61 74 20 30 36 3a |ved today at 06:|
> 00000020 30 30 20 50 4d 2e |00 PM.|
> 00000026
>
> $ hexdump -Cv msg_enc.txt
> 00000000 d7 74 06 ca 73 bd a2 07 38 cb 80 0a 73 62 79 d6 |.t..s...8...sby.|
> 00000010 d4 89 96 a5 ff 5e f6 ba 4e 13 e0 a0 93 f8 81 88 |.....^..N.......|
> 00000020 c0 bb a3 a8 a8 42 |.....B|
> 00000026
>
> As one can see FPE (Format Preserving Encryption) is pretty cool,
> because one can use it with a base26 encoder for SMS messages,
> with an old feature phone and a cute GPD MicroPC and does not
> need a smartphone, which can be easily compromised with Pegasus etc.
>

An optional -salt parameter with PBKDF2 is now available in nora.

--
Regards
Stefan

Subject: Re: fun with nonces
From: Stefan Claas
Newsgroups: sci.crypt
Organization: Ch1ffr3punk5
Date: Tue, 12 Nov 2024 19:28 UTC
References: 1 2 3 4 5 6 7
Path: eternal-september.org!news.eternal-september.org!feeder2.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: pollux@tilde.club (Stefan Claas)
Newsgroups: sci.crypt
Subject: Re: fun with nonces
Date: Tue, 12 Nov 2024 20:28:23 +0100
Organization: Ch1ffr3punk5
Message-ID: <3d64c8bd004e960fe36c09cb9d747607f4fcca0d@i2pn2.org>
References: <324bb1a7476b82ad04e91b41ab885894d25358e3@i2pn2.org> <v69lcb$3e2hf$1@dont-email.me> <1de7695e68c4ca5bb4a87cc8d879a540480d9944@i2pn2.org> <v6esb0$f604$1@dont-email.me> <ce90d5f357361a8628bcc85d2f33cff1163c3bea@i2pn2.org> <84b011b66803d4588ad5a76a6ddb5b09bfe15aad@i2pn2.org> <a56604863db79db919dcaab01acfa9fd565129e2@i2pn2.org>
MIME-Version: 1.0
Injection-Date: Tue, 12 Nov 2024 19:28:56 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="2161462"; mail-complaints-to="usenet@i2pn2.org";
posting-account="ieSrCjSDShpZNyqIW52mlwIkg76Hsp+TOOO6KTdfCN8";
User-Agent: flnews/1.3.0pre4 (for GNU/Linux)
Cancel-Lock: sha1:zbmlygVgPiEIBXlXUPFbqTgcQHY=
X-Ed25519-Pub: c0ffee5a36e581eb10f60b2831b3cdb955d2e7ef680dd282a8d43ad8b84b357a
X-Date: It's Tue Sep 11396 08:28:23 PM CET 1993, the September that never ends.
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Ed25519-Sig: 4456ae88c5182c385fb724e4713bcb698b1540a4aac6d55b6996cd2fe4e145d2
1be09c74bcd747db73b39dfc48bfc4090ccc76e06e60c9f00723083fa93b190b
View all headers

Stefan Claas wrote:

> An optional -salt parameter with PBKDF2 is now available in nora.

An -r parameter is added, so that you can set a date, which is IMHO
very important, when using postal mail and the encrypted message(s)
arrive a couple of days later.

--
Regards
Stefan

1

rocksolid light 0.9.8
clearnet tor