Sorry my english is very poor!
I am using AES. My Key is: uint8_t key[32] = {2,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
The results is:
Before encrypt: abcdefghijklmno After encrypt: a??宁份}??U After decrypt: abcdefghijklmno
Before encrypt: bbcdefghijklmno After encrypt: b????_??? After decrypt: bbcdefghijklmno
Before encrypt: cbcdefghijklmno After encrypt: c6,?迮4??pT After decrypt: cbcdefghijklmno
http://goto.sohu.com/goto.php3?code=libo-gz096mailzhujiao 球迷:英超正版球衣免费等你拿!
wyrainer@sohu.com writes:
I am using AES. My Key is: uint8_t key[32] = {2,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
The results is:
Before encrypt: abcdefghijklmno After encrypt: a??宁份}??U After decrypt: abcdefghijklmno
I have some difficulty verifying this odd effect. The last octet of your input strings are spaces, like "abcdefghijklmno ", right? When reporting problems like this, it's a good idea to include a complete C program that demonstrates the problem.
I wrote the attached program, and I get these results (printed as hex values, and the corresponding ASCII-character, if any):
Before encrypt: 61=a 62=b 63=c 64=d 65=e 66=f 67=g 68=h 69=i 6a=j 6b=k 6c=l 6d=m 6e=n 6f=o 20= After encrypt: 41=A 6a=j 71=q 34=4 2b=+ a8 55=U 9e 94 37=7 b4 9a c3 c1 6e=n 41=A
Before encrypt: 62=b 62=b 63=c 64=d 65=e 66=f 67=g 68=h 69=i 6a=j 6b=k 6c=l 6d=m 6e=n 6f=o 20= After encrypt: 42=B 61=a c6 48=H a3 79=y 7b={ 32=2 e1 be c3 65=e de b0 c8 07
Before encrypt: 63=c 62=b 63=c 64=d 65=e 66=f 67=g 68=h 69=i 6a=j 6b=k 6c=l 6d=m 6e=n 6f=o 20= After encrypt: 9e da 1e c6 88 b3 ac bc 23=# 31=1 94 7d=} b3 b5 da 6e=n
So with this key, the first octets are encrypted as a->A, b->B and c->0x9e. I agree that's a little odd.
Regards, /Niels
nettle-bugs@lists.lysator.liu.se