由买买提看人间百态

topics

全部话题 - 话题: ciphertext
(共0页)
L******t
发帖数: 1985
1
You send a plaintext of your choice to receiver, who will send back you the
ciphertext. Then you got the key by plaintext XOR ciphertext.
Proof:
P xor K = C
P xor P xor K = K
==> K = P xor C
The weakness in the scheme is the encryption algorithm is reversible. And
the receiver cannot verify the authenticity of a sender.
w*******e
发帖数: 285
2
来自主题: Java版 - 一个加密解密的问题?
我在server和client之间的传输用AES加密解密,String和byte[]之间的转换都用UTF8
编码
public String decrypt(String CipherText) {
try {
byte[] raw = decoder.decodeBuffer(CipherText);
byte[] stringBytes = decrypt_cipher.doFinal(raw);
String PlainText = new String(stringBytes, "UTF8");
return PlainText;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
public String encrypt(String PlainText) {
try {
L*********s
发帖数: 3063
3
来自主题: Military版 - 尼玛snowden的情报不够力啊。
ciphertext only, no encryption algorithm, no sample, 你解个试试
h**********g
发帖数: 3962
4
来自主题: Faculty版 - 隔壁个别白人薄厚怒目而视
是不是大家讲中文,日文,韩文?白人会不开心。
也许他心里在想:为什么我说话是用plain text,
而你们说话是用ciphertext,而且还使用三种不
同的钥匙?
(共0页)