Path: ...!news.mixmin.net!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.tota-refugium.de!.POSTED!not-for-mail From: Marcel Logen <333200007110-0201@ybtra.de> Newsgroups: sci.crypt Subject: Re: What are the chances of this encrytion being broken? Date: Wed, 26 Mar 2025 20:25:25 +0100 Organization: Bureau Logen Message-ID: <20250326we192526@o15.ybtra.de> References: <4c1bfc3d01c8a48ad81d1fbf4587e5431cd9389b@i2pn2.org> <20250325tu215422@o15.ybtra.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 26 Mar 2025 20:25:25 +0100 Injection-Info: tota-refugium.de; logging-data="454963"; mail-complaints-to="abuse@news.tota-refugium.de" User-Agent: geLogen/28 (ZmxuZXdzLzEuMy4wcHJlMjggKGZvciBHTlUvTGludXgp) Cancel-Lock: sha1:MEgQyCgYEBi5HUuL22F5b1DXgzA= X-Face: (1]>C4|];jw*D3d6^hRd.B3<|y=VE(!,br`+dv\L3j.?SX5Bp.i$>IK>xVvL9o)Ahn)`B%OD+_(4Y=x&eA+VmI'WX)NhgZt)(inefdtb6VJ]yr:W(aeb8>Z1-!2u8]Z;%)q3Gx&3|onj X-User-ID: eJwFwYEBwCAIA7CXxFKQc5TR/09YQoRFpwfDKeqp36jv0vBrb719pgyn04oEqsJcd+cEsOoHRx0RcA== Bytes: 3750 Lines: 52 colin in sci.crypt: >On 26/03/25 10:54, Marcel Logen wrote: >>colin in sci.crypt: >>>On 25/03/25 12:18, Marcel Logen wrote: [...] >>>>The Base64 decoded 'text' has 528 bytes. >>[...] >> >>>Possibly 33 128 bit blocks ( aes has a block size 0f 128 bits ) >> >>32, I think. >> >>512 bytes of plaintext become 528 bytes of ciphertext >>with AES256 CBC (without salt). > >I can produce 528 bytes of ciphertext with 513 bytes of plaintext. ie an >extra block is added. > >eg: >$ cat 512bytes.txt | aespipe -e aes256 -P password.txt | wc -c >512 >$ cat 513bytes.txt | aespipe -e aes256 -P password.txt | wc -c >528 Ah, OK. I have found the cause: the padding. | user15@o15:/tmp$ stat -c '%s' 512bytes.txt | 512 | user15@o15:/tmp$ openssl enc -aes-256-cbc -in 512bytes.txt -salt -pass pass:1234 -pbkdf2 | wc -c | 544 | user15@o15:/tmp$ openssl enc -aes-256-cbc -in 512bytes.txt -nosalt -pass pass:1234 -pbkdf2 | wc -c | 528 | user15@o15:/tmp$ openssl enc -aes-256-cbc -in 512bytes.txt -nosalt -pass pass:1234 -pbkdf2 -nopad | wc -c | 512 | user15@o15:/tmp$ stat -c '%s' 513bytes.txt | 513 | user15@o15:/tmp$ openssl enc -aes-256-cbc -in 513bytes.txt -nosalt -pass pass:1234 -pbkdf2 | wc -c | 528 | user15@o15:/tmp$ openssl enc -aes-256-cbc -in 513bytes.txt -nosalt -pass pass:1234 -pbkdf2 -nopad | wc -c | bad encrypt | 40E7A9630B7F0000:error:1C80006B:Provider routines:ossl_cipher_generic_block_final:wrong final block length:../providers/implementations/ciphers/ciphercommon.c:420: | 512 Marcel (Lines: 53) -- ╭─────╮ ╭──╮ ╭───╮ ╭─────╮ ╭───╮ ╭─╮ ╭────╮ ╭──────╮ ╭─── ──╯ ╰──╯ ╰─╮ ╰─╮ ╰──╯ ╭──╯ ╰─╮ ╰─╯ │ ╰──╮ ╰─╮ ╰───╮ ╰─╮ ╰──╮ ...8..╭──╯ ╭──╯ ╭─╯ ╭─╯ ╭──╯ ╭──╯ ╰─╮ ╭──╯ ╭─╯ ╭─╯ ╰────╯ ╰───────╯ ╰─────╯ ..50..╰─╯ ╰─────╯