🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.security
Article #63880

Re: AES przykład

#63880
From: Marcin Gryszkalis
Date: Wed, 22 Jul 2009 02:04
26 lines
1832 bytes
Miron A. Kajfasz wrote:
> Uzywam jak mi sie wydaje Rijndael/CBC 128
> Otrzymalem wynik hex:
> 9af89a43d766101649f03b3c4727a942
> 
> Niestety nie bardzo sie to zgadza z tym co pokazuje OpenSSL
> 
> $echo -n "ABCDEFGHIJ" | openssl enc -aes-128-cbc -nosalt -k
> "0123456789abcdef0123456789abcdef" | hexdump
> 0000000 e7da c758 6c96 0eb3 6194 7d0c 663b d9c5

> Co robie nie tak? Jak sprawdzić czy czegoś nie pominąłem?

-k to password - i klucz i iv jest generowany na podstawie hasła (można
obejrzeć je opcją -p), natomiast to co chcesz zrobi -K

% echo -n "ABCDEFGHIJ" | openssl
enc -aes-128-cbc -nosalt -K "0123456789abcdef0123456789abcdef" -iv 0 |
hexdump -C
00000000  9a f8 9a 43 d7 66 10 16  49 f0 3b 3c 47 27 a9 42  

pozdrawiam
-- 
Marcin Gryszkalis, PGP 0x9F183FA3
jabber jid:mg@fork.pl, gg:2532994
http://the.fork.pl
Technical Details
Message-ID: <h45rub$ha3$1@node2.news.atman.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.onet.pl!newsfeed.neostrada.pl!news.underley.eu.org!moderators!marcinw
References: <h44s3r$hf1$1@atlantis.news.neostrada.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.onet.pl!newsfeed.neostrada.pl!news.underley.eu.org!moderators!marcinw
From: Marcin Gryszkalis <mg@fork.pl>
Newsgroups: pl.comp.security
Subject: Re:  AES przykład
Date: Wed, 22 Jul 2009 04:04:58 +0200
Organization: ATMAN
Lines: 27
Message-ID: <h45rub$ha3$1@node2.news.atman.pl>
References: <h44s3r$hf1$1@atlantis.news.neostrada.pl>
NNTP-Posting-Host: ghostwheel.underley.eu.org
Mime-Version: 1.0
X-Trace: node2.news.atman.pl 1248228108 17731 217.113.238.142 (22 Jul 2009 02:01:48 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Wed, 22 Jul 2009 02:01:48 +0000 (UTC)
User-Agent: KNode/0.10.9
X-Moder-Tool: ModerGate.pl v3.0 (c) 2008 Daniel Podlejski
X-Orig-NNTP-Posting-Host: hq.fork.pl
X-Orig-Newsgroups: pl.comp.security
Approved: marcinw.pcs@gmail.com
X-Post-Key: 90a79fbb7d0c6a1e5f2200c02ac30c2e
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit