Encryption check SWIFT

79 views
Skip to first unread message

Alex Lipici

unread,
Jul 23, 2018, 10:06:59 AM7/23/18
to rncryptor
Hi!

I want to check if a file is already encrypted without decrypting it. I heard about a v4 with those magic bytes at the beginning of file. I tried checking for the first byte to see if it is already encrypted, but i think that the response is the same like another error. So, how can I be sure that the file is encrypted by RNCryptor?

Thanx,
   Alex

Rob Napier

unread,
Jul 23, 2018, 10:15:50 AM7/23/18
to rncr...@googlegroups.com
The v3 format is not ideal for this in the general case (the v4 format tries to improve this). But the first two bytes will either be 03 00 (key-based) or 03 01 (password-based). 03 01 are not printable characters and are not the signature for any well known format (at least none that I know), so this is a fairly good signature to look for.

-Rob
Reply all
Reply to author
Forward
0 new messages