Deutsch   English   Français   Italiano  
<vs5ca3$222ae$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: colin <spamcollector393@gmail.com>
Newsgroups: sci.crypt
Subject: Re: What are the chances of this encrytion being broken?
Date: Fri, 28 Mar 2025 18:32:51 +1300
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <vs5ca3$222ae$1@dont-email.me>
References: <vrrh0h$nscg$1@dont-email.me>
 <fCwjUEYVF8eg0zhdLcl3X+q7CCGal0Ox3PTmngktqnw=@writeable.com>
 <vrrovm$11oms$1@dont-email.me> <vrs7tj$1faj3$1@dont-email.me>
 <4c1bfc3d01c8a48ad81d1fbf4587e5431cd9389b@i2pn2.org>
 <d2i3ujh01com46qak21o4j2b1ghnvnubkf@4ax.com> <vrsluv$1s8v9$1@dont-email.me>
 <AABn4ehYfwoAAXGL.A3.flnews@t20.ybtra.de> <vrtho7$2m8jd$1@dont-email.me>
 <20250325tu215422@o15.ybtra.de> <vrvhod$gf0b$1@dont-email.me>
 <20250326we192526@o15.ybtra.de> <vs2m7e$3f962$1@dont-email.me>
 <AABn5XUXG0QAAA3I.A3.flnews@o15.ybtra.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 28 Mar 2025 06:32:53 +0100 (CET)
Injection-Info: dont-email.me; posting-host="28054c3d15fa0440cf1bd965662a2eab";
	logging-data="2165070"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18pGMfjCieepKUutS3YbAXtnlXM0m4RC5g="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:GzEMo5OdjBwfwr0OC1Z55NPZrN0=
In-Reply-To: <AABn5XUXG0QAAA3I.A3.flnews@o15.ybtra.de>
Content-Language: en-US
Bytes: 2763

On 28/03/25 04:56, Marcel Logen wrote:
> colin in sci.crypt:
> 
> [...]
> 
>> Looks like it's up to the implementation of how it implements padding
>> and how many bytes it requires to do it.
>>
>> $ openssl enc -aes-256-cbc -in 511bytes.txt -pass pass:1234 -pbkdf2 | wc -c
>> 528
>> $ cat 511bytes.txt | aespipe -e aes256 -P password.txt | wc -c
>> 512
>>
>> The way I understand it is AES is only a basic building block that takes
>> a 128bit block and scrambles it to a different 128bit block.
>> All the other building blocks ( eg: salt, IV, padding, mode of operation
>> etc ) are added in to suit what the implementation requires.
> 
> | user15@o15:/tmp$ stat -c '%s' 511bytes.txt
> | 511
> 
> | user15@o15:/tmp$ openssl enc -aes-256-cbc -in 511bytes.txt -pass pass:1234 -pbkdf2 | wc -c
> | 528
> 
> | user15@o15:/tmp$ openssl enc -aes-256-cbc -in 511bytes.txt -pass pass:1234 -pbkdf2 -nosalt | wc -c
> | 512
> 
> -nosalt => 512
> 

I think I have got my head around it now.

Openssl adds salt by default.
At least 1 byte of padding is always added ( up to 16 )

Hence with -nosalt
511 -> 512
512 -> 528 ( one block full of just padding )
513 -> 528
527 -> 528
528 -> 544