openssl-enc: needs additional base64 garbage check?

Steffen Nurpmeso <[email protected]>
Newsgroups gmane.comp.encryption.openssl.user
Message-ID <20240704212845.xdniOzv1@steffen%sdaoden.eu>
Hello.

  #?1|kent:tmp$ x=U2FsdGVkX19hzr7eekkcCcfeydWYK7HAeLr2lRPThis
[  ^ $? of last command]

  #?0|kent:tmp$ printf ${x}= | openssl enc -aes256 -k "dubidada" -a -A -pbkdf2 -d
  #?0|kent:tmp$ printf ${x}=t | openssl enc -aes256 -k "dubidada" -a -A -pbkdf2 -d
  #?0|kent:tmp$ printf ${x}=to | openssl enc -aes256 -k "dubidada" -a -A -pbkdf2 -d
  #?0|kent:tmp$ printf ${x}=tor | openssl enc -aes256 -k "dubidada" -a -A -pbkdf2 -d
  #?0|kent:tmp$ printf ${x}=tory | openssl enc -aes256 -k "dubidada" -a -A -pbkdf2 -d
  bad decrypt
  80000908367F0000:error:1C80006B:Provider routines:ossl_cipher_generic_block_final:wrong final block length:providers/implementations/ciphers/ciphercommon.c:443:

  #?1|kent:tmp$ printf ${x} | openssl enc -aes256 -k "dubidada" -a -A -pbkdf2 -d
  bad decrypt
  80105031D77F0000:error:1C80006B:Provider routines:ossl_cipher_generic_block_final:wrong final block length:providers/implementations/ciphers/ciphercommon.c:443:

  #?1|kent:tmp$ printf 0${x} | openssl enc -aes256 -k "dubidada" -a -A -pbkdf2 -d
  bad magic number

  #?1|kent:tmp$ printf 0${x}= | openssl enc -aes256 -k "dubidada" -a -A -pbkdf2 -d
  bad magic number

  #?1|kent:tmp$ printf ${x}= | openssl enc -aes256 -k "dubidada" -a -A -pbkdf2 -d

github issue?

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.