Re: tcllib encyption aes compatibility
- From: Óscar Fuentes <ofv@xxxxxxxxxx>
- Date: Tue, 20 May 2008 03:08:15 +0200
yahalom <yahalome@xxxxxxxxx> writes:
I will check it deeper but what is strange to me is that you both say
'you must':
1.
AES is a 128-bit block cipher. This means that the data must be provided2.
in units that are a multiple of 16 bytes.
-key takes a binary string, not a hexdump as input..., so use binary
format to produce what you need there.
but the aes package works without complaining and it encrypts the data
- so it is not a must but a choice. the aes package manages to work ok
with what I supply it. so if it is mistake I should get error.
IMO, the fact you mention reflects poor QOI (Quality Of Implementation)
of the aes package. It should throw an error when the data has not the
correct size, as it does for the key. This or fallback to a documented
padding system, such as the PKCS5/7, which is fairly common.
anyway I will try with the padding. as for binary string how do I
convert the key I supplied to correct binary format?
See [binary format]. However, this should do what you want:
puts [base64::encode [aes::aes \
-key "\x05\x61\xCB\xC3\x21\x6C\x23\xFC\xDC\x6A\x06\x0A\xF8\x29\xAB\x82" \
-mode ecb "hello[string repeat \x0B 11]"]]
but the result does not coincide with your VB test.
--
Oscar
.
- Follow-Ups:
- Re: tcllib encyption aes compatibility
- From: yahalom
- Re: tcllib encyption aes compatibility
- From: Pat Thoyts
- Re: tcllib encyption aes compatibility
- References:
- tcllib encyption aes compatibility
- From: yahalom
- Re: tcllib encyption aes compatibility
- From: schlenk
- Re: tcllib encyption aes compatibility
- From: yahalom
- Re: tcllib encyption aes compatibility
- From: Óscar Fuentes
- Re: tcllib encyption aes compatibility
- From: yahalom
- tcllib encyption aes compatibility
- Prev by Date: Re: expect script doesnt pass graphics chars correctly
- Next by Date: Re: OT clearcase question [was Re: How to escape this?]
- Previous by thread: Re: tcllib encyption aes compatibility
- Next by thread: Re: tcllib encyption aes compatibility
- Index(es):
Relevant Pages
|