Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.crypt > #50099 > unrolled thread

CHAL2X

Started byRichard Heathfield <rjh@cpax.org.uk>
First post2021-09-23 16:34 +0100
Last post2021-09-28 20:09 +1300
Articles 12 on this page of 32 — 5 participants

Back to article view | Back to sci.crypt


Contents

  CHAL2X Richard Heathfield <rjh@cpax.org.uk> - 2021-09-23 16:34 +0100
    Re: CHAL2X Max <maxturv26@gmx.net> - 2021-09-25 19:45 +0200
      Re: CHAL2X Richard Heathfield <rjh@cpax.org.uk> - 2021-09-25 19:04 +0100
        Re: CHAL2X Max <maxturv26@gmx.net> - 2021-09-25 20:08 +0200
    Re: CHAL2X Max <maxturv26@gmx.net> - 2021-09-25 23:03 +0200
      Re: CHAL2X Richard Heathfield <rjh@cpax.org.uk> - 2021-09-25 22:14 +0100
        Re: CHAL2X Max <maxturv26@gmx.net> - 2021-09-26 00:53 +0200
          Re: CHAL2X Richard Heathfield <rjh@cpax.org.uk> - 2021-09-26 06:59 +0100
            Re: CHAL2X Max <maxturv26@gmx.net> - 2021-09-26 14:40 +0200
              Re: CHAL2X Richard Heathfield <rjh@cpax.org.uk> - 2021-09-26 13:58 +0100
                Re: CHAL2X Max <maxturv26@gmx.net> - 2021-09-26 15:54 +0200
                  Re: CHAL2X Richard Heathfield <rjh@cpax.org.uk> - 2021-09-26 15:06 +0100
                    Re: CHAL2X Max <maxturv26@gmx.net> - 2021-09-26 17:11 +0200
                      Re: CHAL2X Richard Heathfield <rjh@cpax.org.uk> - 2021-09-26 16:53 +0100
                        Re: CHAL2X Richard Heathfield <rjh@cpax.org.uk> - 2021-09-26 17:12 +0100
                        Re: CHAL2X Max <maxturv26@gmx.net> - 2021-09-26 18:42 +0200
                          Re: CHAL2X Richard Heathfield <rjh@cpax.org.uk> - 2021-09-26 18:27 +0100
                            Re: CHAL2X Max <maxturv26@gmx.net> - 2021-09-26 20:43 +0200
                              Re: CHAL2X Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-09-26 20:41 +0100
                                Re: CHAL2X Max <maxturv26@gmx.net> - 2021-09-26 21:46 +0200
                                Re: CHAL2X Richard Heathfield <rjh@cpax.org.uk> - 2021-09-26 20:57 +0100
                                  Re: CHAL2X Stefan Claas <spam.trap.usenet@gmail.com> - 2021-09-26 13:19 -0700
                                    Re: CHAL2X Max <maxturv26@gmx.net> - 2021-09-26 22:30 +0200
                                      Re: CHAL2X Richard Heathfield <rjh@cpax.org.uk> - 2021-09-26 21:37 +0100
                                    Re: CHAL2X Richard Heathfield <rjh@cpax.org.uk> - 2021-09-26 21:33 +0100
                                      Re: CHAL2X Stefan Claas <spam.trap.usenet@gmail.com> - 2021-09-26 13:39 -0700
                              Re: CHAL2X Richard Heathfield <rjh@cpax.org.uk> - 2021-09-26 20:53 +0100
                    Re: CHAL2X Colin <a@b.com> - 2021-09-27 19:11 +1300
                      Re: CHAL2X Richard Heathfield <rjh@cpax.org.uk> - 2021-09-27 07:41 +0100
                        Re: CHAL2X Colin <a@b.com> - 2021-09-27 20:02 +1300
                          Re: CHAL2X Richard Heathfield <rjh@cpax.org.uk> - 2021-09-27 08:27 +0100
                      Re: CHAL2X Colin <a@b.com> - 2021-09-28 20:09 +1300

Page 2 of 2 — ← Prev page 1 [2]


#50168

FromRichard Heathfield <rjh@cpax.org.uk>
Date2021-09-26 20:57 +0100
Message-ID<siqjam$bri$2@dont-email.me>
In reply to#50165
On 26/09/2021 20:41, Ben Bacarisse wrote:
> Max <maxturv26@gmx.net> writes:
> 
>> One more question: the seed has to be an integer, right? What is the
>> valid range for it? At some stage I will take a closer look at the
>> code, but for now asking you is the lazy option for me. Hope you don't
>> mind.
> 
> The codes says:
> 
> * TODO: validate the sbseed to ensure it's < 2^31.

Indeed. In actual use it won't last more than a few microseconds before 
it's &='d with 0x7FFFFFFFUL.

-- 
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within

[toc] | [prev] | [next] | [standalone]


#50171

FromStefan Claas <spam.trap.usenet@gmail.com>
Date2021-09-26 13:19 -0700
Message-ID<46e50127-3a6a-4c73-9a75-7c3d6e99d11bn@googlegroups.com>
In reply to#50168
On Sunday, September 26, 2021 at 9:57:12 PM UTC+2, Richard Heathfield wrote:
> On 26/09/2021 20:41, Ben Bacarisse wrote: 
> > Max <maxt...@gmx.net> writes: 
> > 
> >> One more question: the seed has to be an integer, right? What is the 
> >> valid range for it? At some stage I will take a closer look at the 
> >> code, but for now asking you is the lazy option for me. Hope you don't 
> >> mind. 
> > 
> > The codes says: 
> > 
> > * TODO: validate the sbseed to ensure it's < 2^31.
> Indeed. In actual use it won't last more than a few microseconds before 
> it's &='d with 0x7FFFFFFFUL.

I have a little question (I am no C programmer) Do you think it would make
sense that instead of typing in the sbseed value it would be useful if a user
of your software would run something like:

shuf -i 1-2147483647 -n 100 > sbseed.txt

and your program would mark the used values, after usage, with
say an '*', so than when all values are used your program would
say something like 'sbeed file used up'?

Regards
Stefan

[toc] | [prev] | [next] | [standalone]


#50173

FromMax <maxturv26@gmx.net>
Date2021-09-26 22:30 +0200
Message-ID<siql8c$47r$1@gioia.aioe.org>
In reply to#50171
On 26.09.21 22:19, Stefan Claas wrote:
> On Sunday, September 26, 2021 at 9:57:12 PM UTC+2, Richard Heathfield wrote:
>> On 26/09/2021 20:41, Ben Bacarisse wrote:
>>> Max <maxt...@gmx.net> writes:
>>>
>>>> One more question: the seed has to be an integer, right? What is the
>>>> valid range for it? At some stage I will take a closer look at the
>>>> code, but for now asking you is the lazy option for me. Hope you don't
>>>> mind.
>>>
>>> The codes says:
>>>
>>> * TODO: validate the sbseed to ensure it's < 2^31.
>> Indeed. In actual use it won't last more than a few microseconds before
>> it's &='d with 0x7FFFFFFFUL.
> 
> I have a little question (I am no C programmer) Do you think it would make
> sense that instead of typing in the sbseed value it would be useful if a user
> of your software would run something like:
> 
> shuf -i 1-2147483647 -n 100 > sbseed.txt
> 
> and your program would mark the used values, after usage, with
> say an '*', so than when all values are used your program would
> say something like 'sbeed file used up'?
> 
> Regards
> Stefan
> 

Hey, Stefan, you bring up a valid point. If the seed is crucial to the 
security of the cipher, 2**31 gives you collisions after about 2**16, 
i.e. 65k, messages. That's not a lot. Alternatively, could the PRNG be 
enhanced to also work with, say, 96 bit-seeds?

Cheers,

Max

[toc] | [prev] | [next] | [standalone]


#50175

FromRichard Heathfield <rjh@cpax.org.uk>
Date2021-09-26 21:37 +0100
Message-ID<siqlms$sjq$2@dont-email.me>
In reply to#50173
On 26/09/2021 21:30, Max wrote:
> On 26.09.21 22:19, Stefan Claas wrote:
>> On Sunday, September 26, 2021 at 9:57:12 PM UTC+2, Richard Heathfield 
>> wrote:
>>> On 26/09/2021 20:41, Ben Bacarisse wrote:
>>>> Max <maxt...@gmx.net> writes:
>>>>
>>>>> One more question: the seed has to be an integer, right? What is the
>>>>> valid range for it? At some stage I will take a closer look at the
>>>>> code, but for now asking you is the lazy option for me. Hope you don't
>>>>> mind.
>>>>
>>>> The codes says:
>>>>
>>>> * TODO: validate the sbseed to ensure it's < 2^31.
>>> Indeed. In actual use it won't last more than a few microseconds before
>>> it's &='d with 0x7FFFFFFFUL.
>>
>> I have a little question (I am no C programmer) Do you think it would 
>> make
>> sense that instead of typing in the sbseed value it would be useful if 
>> a user
>> of your software would run something like:
>>
>> shuf -i 1-2147483647 -n 100 > sbseed.txt
>>
>> and your program would mark the used values, after usage, with
>> say an '*', so than when all values are used your program would
>> say something like 'sbeed file used up'?
>>
>> Regards
>> Stefan
>>
> 
> Hey, Stefan, you bring up a valid point. If the seed is crucial to the 
> security of the cipher

The S-boxes are not part of the key.

-- 
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within

[toc] | [prev] | [next] | [standalone]


#50174

FromRichard Heathfield <rjh@cpax.org.uk>
Date2021-09-26 21:33 +0100
Message-ID<siqlek$sjq$1@dont-email.me>
In reply to#50171
On 26/09/2021 21:19, Stefan Claas wrote:
> On Sunday, September 26, 2021 at 9:57:12 PM UTC+2, Richard Heathfield wrote:
>> On 26/09/2021 20:41, Ben Bacarisse wrote:
>>> Max <maxt...@gmx.net> writes:
>>>
>>>> One more question: the seed has to be an integer, right? What is the
>>>> valid range for it? At some stage I will take a closer look at the
>>>> code, but for now asking you is the lazy option for me. Hope you don't
>>>> mind.
>>>
>>> The codes says:
>>>
>>> * TODO: validate the sbseed to ensure it's < 2^31.
>> Indeed. In actual use it won't last more than a few microseconds before
>> it's &='d with 0x7FFFFFFFUL.
> 
> I have a little question (I am no C programmer) Do you think it would make
> sense that instead of typing in the sbseed value it would be useful if a user
> of your software would run something like:
> 
> shuf -i 1-2147483647 -n 100 > sbseed.txt
> 
> and your program would mark the used values, after usage, with
> say an '*', so than when all values are used your program would
> say something like 'sbeed file used up'?

I went to some trouble to ensure that CDX's use of PRNGs would be the 
same for Alice and for Bob. What you're now asking me to do is synch 
Alice and Bob's shuf PRNGs, and Carol (for her sins a Win32 user) is 
asking "what is shuf?"

No, a seed can be exchanged over a phone line. It isn't even part of the 
key (unless Alice and Bob choose to make it so by not publicising it); 
CDX's security does not depend on secret S-boxes.

-- 
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within

[toc] | [prev] | [next] | [standalone]


#50176

FromStefan Claas <spam.trap.usenet@gmail.com>
Date2021-09-26 13:39 -0700
Message-ID<c8356fb2-7de9-4d9a-8d5b-3bac12dfba48n@googlegroups.com>
In reply to#50174
On Sunday, September 26, 2021 at 10:33:26 PM UTC+2, Richard Heathfield wrote:
> On 26/09/2021 21:19, Stefan Claas wrote: 
> > On Sunday, September 26, 2021 at 9:57:12 PM UTC+2, Richard Heathfield wrote: 
> >> On 26/09/2021 20:41, Ben Bacarisse wrote: 
> >>> Max <maxt...@gmx.net> writes: 
> >>> 
> >>>> One more question: the seed has to be an integer, right? What is the 
> >>>> valid range for it? At some stage I will take a closer look at the 
> >>>> code, but for now asking you is the lazy option for me. Hope you don't 
> >>>> mind. 
> >>> 
> >>> The codes says: 
> >>> 
> >>> * TODO: validate the sbseed to ensure it's < 2^31. 
> >> Indeed. In actual use it won't last more than a few microseconds before 
> >> it's &='d with 0x7FFFFFFFUL. 
> > 
> > I have a little question (I am no C programmer) Do you think it would make 
> > sense that instead of typing in the sbseed value it would be useful if a user 
> > of your software would run something like: 
> > 
> > shuf -i 1-2147483647 -n 100 > sbseed.txt 
> > 
> > and your program would mark the used values, after usage, with 
> > say an '*', so than when all values are used your program would 
> > say something like 'sbeed file used up'?
> I went to some trouble to ensure that CDX's use of PRNGs would be the 
> same for Alice and for Bob. What you're now asking me to do is synch 
> Alice and Bob's shuf PRNGs, and Carol (for her sins a Win32 user) is 
> asking "what is shuf?" 
> 
> No, a seed can be exchanged over a phone line. It isn't even part of the 
> key (unless Alice and Bob choose to make it so by not publicising it); 
> CDX's security does not depend on secret S-boxes.

Ah, ok, understood. Thanks for explaining!

Regards
Stefan

[toc] | [prev] | [next] | [standalone]


#50167

FromRichard Heathfield <rjh@cpax.org.uk>
Date2021-09-26 20:53 +0100
Message-ID<siqj3q$bri$1@dont-email.me>
In reply to#50164
On 26/09/2021 19:43, Max wrote:
> On 26.09.21 19:27, Richard Heathfield wrote:
> <snip>
> 
>>
>> But hey! Maybe you've found a way in?
>>
> 
> Certainly not. I'm just poking around at this stage. For now I'm 
> concerned that long stretches of zeros (other values, too) in the 
> plaintext show in the ciphertext, even if the key and the seed are 
> non-trivial. This might hold for other repeating patterns, too, but I am 
> not there, yet. This results in a repeating pattern in the ciphertext 
> that seems to have the length of the key, thus, giving away relevant 
> information about the key (its length) and about the plaintext (long 
> stretch of repeating data).
> 
> One more question: the seed has to be an integer, right?

Yes.

> What is the 
> valid range for it?

0 to 2^31-1.

-- 
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within

[toc] | [prev] | [next] | [standalone]


#50181

FromColin <a@b.com>
Date2021-09-27 19:11 +1300
Message-ID<sirnb7$sla$1@gioia.aioe.org>
In reply to#50154
If the plaintext length is a multiple of the key length then you have 
problems

eg keylength = 16, plaintext length = 4096

$ hexdump -C p.txt
00000000  61 61 61 61 61 61 61 61  61 61 61 61 61 61 61 61 
|aaaaaaaaaaaaaaaa|
*
00001000

$ hexdump -C key
00000000  30 31 32 33 34 35 36 37  38 39 61 62 63 64 65 66 
|0123456789abcdef|
00000010

$ ./cdx4 p.txt c.bin key 1
................

$ hexdump -C c.bin
00000000  29 88 64 2a 2a a2 55 5b  41 cb 57 72 ad 77 f1 25 
|).d**.U[A.Wr.w.%|
*
00001000



therefore apply kasiski and freq analysis as you have a Polyalphabetic 
cipher

[toc] | [prev] | [next] | [standalone]


#50183

FromRichard Heathfield <rjh@cpax.org.uk>
Date2021-09-27 07:41 +0100
Message-ID<sirp23$qpv$1@dont-email.me>
In reply to#50181
On 27/09/2021 07:11, Colin wrote:
> If the plaintext length is a multiple of the key length then you have 
> problems

Clearly not a break - bear with me - BUT definitely an attack, and the 
first attack that has bothered CDX... ever. (The only known previous 
attack was "distinguish from random".) I'd like to cite you in the 
comments of CDX-5 (as soon as I've fixed this weakness); how should I do 
so? My email works if you prefer a private channel.

-- 
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within

[toc] | [prev] | [next] | [standalone]


#50184

FromColin <a@b.com>
Date2021-09-27 20:02 +1300
Message-ID<sirqau$3cm$1@gioia.aioe.org>
In reply to#50183
On 27/09/21 7:41 pm, Richard Heathfield wrote:
> On 27/09/2021 07:11, Colin wrote:
>> If the plaintext length is a multiple of the key length then you have 
>> problems
> 
> Clearly not a break - bear with me - BUT definitely an attack, and the 
> first attack that has bothered CDX... ever. (The only known previous 
> attack was "distinguish from random".) I'd like to cite you in the 
> comments of CDX-5 (as soon as I've fixed this weakness); how should I do 
> so? My email works if you prefer a private channel.
> 

You can call me Colin from sci.crypt


ps: more info at
https://groups.google.com/g/sci.crypt/c/DaLXY2swcoA

[toc] | [prev] | [next] | [standalone]


#50185

FromRichard Heathfield <rjh@cpax.org.uk>
Date2021-09-27 08:27 +0100
Message-ID<sirrol$bov$1@dont-email.me>
In reply to#50184
On 27/09/2021 08:02, Colin wrote:
> On 27/09/21 7:41 pm, Richard Heathfield wrote:
>> On 27/09/2021 07:11, Colin wrote:
>>> If the plaintext length is a multiple of the key length then you have 
>>> problems
>>
>> Clearly not a break - bear with me - BUT definitely an attack, and the 
>> first attack that has bothered CDX... ever. (The only known previous 
>> attack was "distinguish from random".) I'd like to cite you in the 
>> comments of CDX-5 (as soon as I've fixed this weakness); how should I 
>> do so? My email works if you prefer a private channel.
>>
> 
> You can call me Colin from sci.crypt
> 
> 
> ps: more info at
> https://groups.google.com/g/sci.crypt/c/DaLXY2swcoA

Oh shit. So it's been spotted before. Thanks for the walk down Memory Lane!

-- 
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within

[toc] | [prev] | [next] | [standalone]


#50210

FromColin <a@b.com>
Date2021-09-28 20:09 +1300
Message-ID<siuf41$prm$1@gioia.aioe.org>
In reply to#50181
> 
> therefore apply kasiski and freq analysis as you have a Polyalphabetic 
> cipher
> 

actually not quite right, as randomness of the plain text affects the 
cipher text randomness.

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | sci.crypt


csiph-web