Member since
09-10-2024
2
Posts
1
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
203 | 10-31-2024 12:50 AM |
10-31-2024
12:50 AM
For anyone reading here; I never got the DecryptContent processor to work. Made a Groovy script processor instead, that handled the decrypting
... View more
09-10-2024
01:33 AM
1 Kudo
I have the AES decryption working in a Nodejs script using crypto locally on my computer, with the following parts: Text to decrypt: c6 c7 4b 49 0d cf 5c 20 87 0a e0 cd c4 a7 bf 94 d8 Key: 3E 9B 26 FE 46 4F 6D 2D 2F 69 5D 87 8A 07 93 74 Initialization Vector (IV): 2d 2c 83 42 00 74 1b 16 20 c0 7d 13 20 00 00 00 Correct result: 14 25 79 ed a8 ff a7 00 00 e5 03 00 00 be 03 00 00 So I know both key and IV are correct. I am using AES128, CTR and NoPadding Now, I need to do it in Apache Nifi, and I am trying to use the DecryptContent processor. I am confused about how to make it happen and have tried quite a few things, the latest being: Cipher Algorithm Mode is set to CTR Cipher Algorithm Padding is set to NoPadding Key Specification Format: RAW I have set the content of the incoming flowfile content to c6c74b490dcf5c20870ae0cdc4a7bf94d84E69466949562d2c834200741b1620c07d1320000000 (With 4E6946694956 as the NiFiIV delimiter) This results in an error from the DecryptContent processor: "Wrong IV length: must be 16 bytes long" This suggests to me that it is reading the payload as a normal text string, and not as HEX values. Is there a way to set the content to HEX specifically? The documentation is a little sketchy about how to provide the content to be decrypted (or I have just missed something), so I am hoping you can help me.
... View more
Labels:
- Labels:
-
Apache NiFi