which algorithm is better for encrypt and decrypt data inside a project?
which algorithm is better for encrypt and decrypt data inside a project?
i designed and developed a site like below : htttp://www.soscharge.comthis site is about mobile charge codes ...
i 开发者_开发技巧want to encrypt mobile charge codes during insert to database and decrypt them for showing to users...
hash algorithm is not a good idea about this purpose (one way algorithm)
i heard something about symmetric and asymmetric algorithms (but i want to learn how can i write a simple and powerfull algorithm by myself)
thanks in advance
never - NEVER write your encryption-algorithms yourself if you are not an expert and get paid for it! Seriously: you will never get a good and secure algorithm working just by yourself. Use the tools in the Framework - System.Security.Cryptography namespace! And you don't ask for synchronous vs. asynchronous but I guess you are thinking on symmetric vs. assymetric algorithms
now to the answer: as you have full controll of your database and an outsider should not be able to get to it you can use symmetric key algorithms because you protect your "secret" (the key) on your system and the user will never see it (or so it should be - if your system is secure can only a IT-guy tell you)
which algorithm is better for encrypt and decrypt data inside a project?
You didn't give us any criteria on which to evaluate "better."
Frankly, it sounds like you're not a security expert. This stuff is so easy to get wrong, even if you pick the "best" algorithm (look at the recent RSA debacle). If you have secrets that truly need to be safeguarded, you should hire a security expert. Your stakeholders will thank you later.
(but i want to learn how can i write a simple and powerfull algorithm by myself)
Take a course. Read a book (or two; the Bruce Schneier books are decent). Practice for about 10,000 hours.
i heard something about synchronous and asynchronous algorithms
Symmetric and asymmetric, perhaps? I mean, this tells us all we need to know about your level of expertise on this subject.
Seriously, don't do this yourself. Get an expert to help you.
I assume that you need symmetric algo, by now best choice is AES. It's easy, strong and has implementations for most platforms and languages.
精彩评论