Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #227876
| From | Philipp Ewald <philipp.ewald@digionline.de> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: OpenSSl encrpt and decrypt a String |
| Date | 2020-10-16 18:30 +0200 |
| Message-ID | <B0AM9-7xh-7@gated-at.bofh.it> (permalink) |
| References | <B0yr0-60c-3@gated-at.bofh.it> <B0ACu-7u9-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Thank you! I have used this : openssl base64 -d instead of "base64 -d" ...... On 16.10.20 18:09, Reco wrote: > Hi. > > On Fri, Oct 16, 2020 at 03:58:46PM +0200, Philipp Ewald wrote: >> echo -n "That's the text" | openssl enc -aes-256-cbc -a -A -nosalt >> >> gives me following "String": >> ttn39k7YiglePLvmmc6s+w== > > Correct so far, assuming that you've entered a passphrase from the > keyboard. > > >> echo -n "ttn39k7YiglePLvmmc6s+w==" | openssl base64 -d | openssl enc -d -aes-256-cbc > > Wrong one. By default openssl assumes that plaintext is salted before > the encryption. > > >> echo -n "ttn39k7YiglePLvmmc6s+w==" | openssl base64 -d | openssl enc -d -aes-256-cbc -nosalt > > That one worked for me, but I've used a different passphrase, so the > ciphertext was different: > > $ echo -n "That's the text" | openssl enc -aes-256-cbc -a -A -nosalt -k foo 2>/dev/null > 3zGGAzM31Vsu9cax67TUrw== > $ echo -n 3zGGAzM31Vsu9cax67TUrw== | base64 -d | openssl enc -d -aes-256-cbc -nosalt -k foo 2>/dev/null > That's the text > $ openssl version > OpenSSL 1.1.1d 10 Sep 2019 > > Reco > -- Philipp Ewald Administrator DigiOnline GmbH, Probsteigasse 15 - 19, 50670 Köln Telefon: +49 221 6500-532, Fax: +49 221 6500-690, E-Mail: philipp.ewald@digionline.de AG Köln HRB 27711, St.-Nr. 5215 5811 0640 Geschäftsführer: Werner Grafenhain Informationen zum Datenschutz: www.digionline.de/ds
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
OpenSSl encrpt and decrypt a String Philipp Ewald <philipp.ewald@digionline.de> - 2020-10-16 16:00 +0200
Re: OpenSSl encrpt and decrypt a String Reco <recoverym4n@enotuniq.net> - 2020-10-16 18:20 +0200
Re: OpenSSl encrpt and decrypt a String Philipp Ewald <philipp.ewald@digionline.de> - 2020-10-16 18:30 +0200
Re: OpenSSl encrpt and decrypt a String Reco <recoverym4n@enotuniq.net> - 2020-10-16 19:40 +0200
Re: OpenSSl encrpt and decrypt a String l0f4r0@tuta.io - 2020-10-16 22:40 +0200
csiph-web