Small Crypt/DecryptString function for Windows using CryptProtectData
Small Crypt/DecryptString function for Windows using CryptProtectData
http://lookinside.free.fr/delphi.php?Cryptage
https://msdn.microsoft.com/fr-fr/library/windows/desktop/aa380261(v=vs.85).aspx
http://lookinside.free.fr/delphi.php?Cryptage
http://lookinside.free.fr/delphi.php?Cryptage
https://msdn.microsoft.com/fr-fr/library/windows/desktop/aa380261(v=vs.85).aspx
http://lookinside.free.fr/delphi.php?Cryptage
We have made our own Cross-Platform version of those, which are more secure (for several reasons, e.g. using known and proven algorithms in a not obfuscated pattern from outside a patriot act country), and 100x faster. See https://synopse.info/files/html/api-1.18/SynCrypto.html#CRYPTDATAFORCURRENTUSER
ReplyDeleteWe use it e.g. to cypher any master key resident in memory, to avoid forensic leaks.
About the actual security of those functions. DPAPI has been closely reverse engineered - see e.g. https://www.passcape.com/index.php?section=docsys&cmd=details&id=28
ReplyDeleteSuggested test data string: "only for light weight protection" (:
ReplyDeleteAlors tout d'abord, on dit chiffrer et pas crypter ;-) chiffrer.info - Chiffrer.info
ReplyDeleteSavez-vous quel algorithme de chiffrement est utilisé ? Je ne trouve pas l'info dans la doc Windows. On ne sait pas non plus comment est dérivée la clé à partir des données utilisateurs. Je trouve que c'est compliqué de faire confiance à une telle fonction avec si peu d'infos.
Marion Candau ok, but it's an english forum (even my bad english is better than french) ;) I suppose that the internal depends of the Windows version, and the purpose of my unit is to provide an easy to use existing implementation...if security is a important point, perhaps Windows is not the good OS to use ;) Like Speck for Linux, I think it's better to trust this function then XOR for instance :)
ReplyDeletePaul TOTH - I agree. Some encryption is much better than none. The MS libs are fairly good. Your example demonstrates an easy implementation and fast results. It's a great example and a useful contribution. Thanks for posting it.
ReplyDeleteIs that persistent? Or Runtime only? or per user or per computer?
ReplyDelete