Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unspected decrypt result - TripleDES - ECB #147

Open
gerion-angel opened this issue Feb 6, 2018 · 0 comments
Open

unspected decrypt result - TripleDES - ECB #147

gerion-angel opened this issue Feb 6, 2018 · 0 comments

Comments

@gerion-angel
Copy link

gerion-angel commented Feb 6, 2018

var CryptoJS = require("crypto-js");

var key = CryptoJS.enc.Hex.parse("CB3A28103B71AA2464A478750664EDB4")
var text = "160BBF7C2F7813659B50A084360F27BF"
text = CryptoJS.lib.CipherParams.create(
        {
            ciphertext: CryptoJS.enc.Hex.parse(text) 
        }
    )
// Decrypt
CryptoJS.TripleDES.decrypt(
    text,
    key,
    { 
        mode: CryptoJS.mode.ECB,
        padding: CryptoJS.pad.NoPadding
    }).toString(CryptoJS.enc.Hex);

i'm trying to decrypt var text.

i know it must be AE1...........AA5, but i get bbe ........ 934

i don't know what i'm doing wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant