-1

abcde.test.com から登録解除するための暗号化された電子メール ID があります。

for ex : https://abcde.test.com/Forms/unSubscribe.jsp?n=2&rid=00028e7353d9c4eca480a579e10ef09b&eid=588876054d458e62779be9345f399252cac7346ad8c464b8ed0bdfbff3512dd96a5b4190c5d71c30c90c34ff39e544aa

これは aes-256.where eid="encrypted message" で暗号化され、キーサイズと組み合わせると削除されます。

次に、このメッセージを解読したいと思います。誰でもそれを解読するのを手伝ってもらえますか?

4

1 に答える 1

0

Java SE と Apache Commons を使用して、次のことを試してください。暗号のモードまたはパディングを指定していないことに注意してください (「AES」のみ)。そのため、いくつかの調整が必要になる場合があります。

// decode the key string into bytes (using Apache Commons)
byte[] keyBytes = Hex.decodeHex(keystr.toCharArray());

// create a representation of the key
SecretKeySpec spec = new SecretKeySpec(keyBytes, "AES");

// turn the key spec into a usable key
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("AES");
SecretKey key = keyFactory.generateSecret(spec);

// use a cipher to decrypt the eid
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
cipher.init(Cipher.DECRYPT_MODE, key);
byte[] plainText = cipher.doFinal(hex.decodeHex(eid.toCharArray())); // decode from Hex again

型が何を表しているのかわからないeidので、それを具体的なものに変えるのはあなた次第ですが、例を次に示します。

String eid = new String(plainText, "ASCII");
于 2012-10-11T10:08:39.633 に答える