onmyway133 / Arcane

:trident: CommonCrypto in Swift, and more
https://onmyway133.github.io/
Other
284 stars 22 forks source link

Usage with openssl #8

Closed Lbatson closed 7 years ago

Lbatson commented 7 years ago

Looking at the implementation of AES.encrypt, it looks like it uses Hash.SHA384 for the key and iv that gets passed to CCCrypt. My question is how does this translate back out to using something like openssl to decrypt. I was trying something like openssl enc -aes128 -k test -p -base64 -d -in test.enc however I continually get bad decrypt or bad magic number I assume I'm not passing the correct parameters. It also supports aes-128-cbc cipher, which doesn't seem to work either. I think i'm missing something with the hashing piece and iv. Any ideas?

onmyway133 commented 7 years ago

@Lbatson Hi, The AES function just uses CommonCrypto under the hood. For openssl question, I think it's best that you can ask in their repo https://github.com/openssl/openssl. They can answer you better than I do