How can I disable padding? #963
Replies: 17 comments
-
use nil with code from branch 'develop' |
Beta Was this translation helpful? Give feedback.
-
Thank you, I'm going to try it |
Beta Was this translation helpful? Give feedback.
-
Hi, by using develop branch to disable data padding, it works. But the encrypted data can't be decrypted by Node.js. The first two bytes can be decrypted, but the last encrypted data can't be decrypted.
Here is protocol:
Is my code writing wrong? |
Beta Was this translation helpful? Give feedback.
-
@dickwu The problem is: the encrypted data can't be decrypted by Node.js. The first two bytes can be decrypted, but the last data CAN'T be decrypted. |
Beta Was this translation helpful? Give feedback.
-
http://8gwifi.org/CipherFunctions.jsp |
Beta Was this translation helpful? Give feedback.
-
I tested my code, but I don't know where wrong: IV from client Server received IV No problem with IV. Sent encrypted data from client Server received data No problem with encrypted data Server decrypted data Client decrypted data The decrypted data not same, why? But the first two can be decrypted by server! Cipher algorithm and cipher key are same. First two bytes sent from client: First two bytes decrypted by server: |
Beta Was this translation helpful? Give feedback.
-
I used CFB block-mode. |
Beta Was this translation helpful? Give feedback.
-
I need the iv func to debug |
Beta Was this translation helpful? Give feedback.
-
IV function ? I just use AES.randomIV(16) to generate IV. @dickwu I don't use QQ, can we use email to communicate? |
Beta Was this translation helpful? Give feedback.
-
ok my email is [email protected] |
Beta Was this translation helpful? Give feedback.
-
@krzyzanowskim Hi, author. Do you know why Node.js can't decrypt it? |
Beta Was this translation helpful? Give feedback.
-
@SunshinyNeko I see a lot of problem how you use Node and CryptoSwift and convert types. From what I see you encrypt encrypt invalid data with this code. |
Beta Was this translation helpful? Give feedback.
-
Encrypt invalid data? Could you tell me how to do it rightly? |
Beta Was this translation helpful? Give feedback.
-
@krzyzanowskim I know where wrong, thank you, you are right. :) |
Beta Was this translation helpful? Give feedback.
-
I want to disable data padding, and I passed nil to padding, but no effect. Please tell me how to disable data padding, thank you.
Beta Was this translation helpful? Give feedback.
All reactions