This repository has been archived by the owner on Sep 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 550
StringEncryption
Zhang edited this page Feb 25, 2020
·
2 revisions
Pass -mllvm -enable-strcry
to enable. Unlike Armariris , we provide support for ObjC-Style strings and better over-all security.
- We "unfold" ConstantExpressions into Instructions for all functions.
- We collect all strings used in this function and "copy" them, modify all uses to our copy
- We also create a new GV marking status of if the copies have been decrypted.
- We insert detection as well as decryption code at function start.Note this is done atomically so it should be thread-safe(Hopefully).
- We write flag back to mark the GVs have been decrypted(Also atomically).
- We clean-up uses and erase the original GV if it's no longer used
- StringEncryption Protected Function's first entry is NOT THREAD SAFE! See #80 for a detailed write-up in case you think you've come up with some clever implementation to work around this issue