{"id":30546,"date":"2015-08-08T22:43:35","date_gmt":"2015-08-09T02:43:35","guid":{"rendered":"http:\/\/www.opensource.im\/uncategorized\/net-encryption-simplified-codeproject.php"},"modified":"2015-08-08T22:43:35","modified_gmt":"2015-08-09T02:43:35","slug":"net-encryption-simplified-codeproject","status":"publish","type":"post","link":"https:\/\/euvolution.com\/open-source-convergence\/encryption\/net-encryption-simplified-codeproject.php","title":{"rendered":".NET Encryption Simplified &#8211; CodeProject"},"content":{"rendered":"<p><p>    Microsoft's .NET framework has robust support for encryption in    the System.Security.Cryptography namespace.    Everything you need to perform encryption is available in that    class, but it's difficult to understand unless you have a firm    grasp of cryptographic theory. Over the last four months, I've    struggled with the concepts and theory behind encrypting and    decrypting data. I've wrapped all my derived knowledge into a    class I call Encryption. This class is heavily    documented, string oriented, and most of all, simple! It's    ideal for learning more about encryption.  <\/p>\n<p>    There are three essential cryptographic concepts represented in    the Encryption namespace. It's important that    every developer understands these concepts before proceeding    any further:  <\/p>\n<p>        Hashes aren't encryption, per se, but they are fundamental        to all other encryption operations. A hash is a data        fingerprint - a tiny set of bytes that represents the        uniqueness of a much larger block of bytes. Like        fingerprints, no two should ever be alike, and a matching        fingerprint is conclusive proof of identity. A full        discussion of hashes is outside the scope of this article,        but I highly recommend Steve Friedl's Illustrated Guide to Cryptographic        Hashes for more background.      <\/p>\n<p>        In symmetric encryption, a single key is used for        encrypting and decrypting the data. This type of        encryption is quite fast, but has a severe problem: in        order to share a secret with someone, they have to know        your key. This implies a very high level of trust between        people sharing secrets; if an unscrupulous person has your        key-- or if your key is intercepted by a spy-- they can        decrypt all the messages you send using that key!      <\/p>\n<p>        Asymmetric encryption solves the trust problem inherent in        symmetric encryption by using two different keys: a        public key for encrypting messages, and a private key for        decrypting messages. This makes it possible to        communicate in secrecy with people you don't fully trust.        If an unscrupulous person has your public key, who cares?        The public key is only good for encryption; it's useless        for decryption. They can't decrypt any of your messages!        However, asymmetric encryption is very slow. It's        not recommended for use on more than roughly 1 kilobyte of        data.      <\/p>\n<p>    These three concepts are heavily intertwined and always seen    together in modern cryptography. They have different strengths    and weaknesses; combining them offers a much higher level of    security than can be achieved using a single method alone. For    example, when digitally transmitting a check to your bank, all    three of these methods are used:  <\/p>\n<\/p>\n<p>    Image reprinted from Entrust's Introduction to Cryptography and Digital    Signatures PDF.  <\/p>\n<p>    In order to open the check, these steps are simply performed in    the reverse order by the recipient. Note that if any of these    steps were missing, the transaction would have significant    weaknesses that could be exploited!  <\/p>\n<p><!-- Auto Generated --><\/p>\n<p>See more here:<br \/>\n<a target=\"_blank\" href=\"http:\/\/www.codeproject.com\/Articles\/10154\/NET-Encryption-Simplified\" title=\".NET Encryption Simplified - CodeProject\">.NET Encryption Simplified - CodeProject<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p> Microsoft's .NET framework has robust support for encryption in the System.Security.Cryptography namespace. Everything you need to perform encryption is available in that class, but it's difficult to understand unless you have a firm grasp of cryptographic theory<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[45],"tags":[],"class_list":["post-30546","post","type-post","status-publish","format-standard","hentry","category-encryption"],"_links":{"self":[{"href":"https:\/\/euvolution.com\/open-source-convergence\/wp-json\/wp\/v2\/posts\/30546"}],"collection":[{"href":"https:\/\/euvolution.com\/open-source-convergence\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/euvolution.com\/open-source-convergence\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/euvolution.com\/open-source-convergence\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/euvolution.com\/open-source-convergence\/wp-json\/wp\/v2\/comments?post=30546"}],"version-history":[{"count":0,"href":"https:\/\/euvolution.com\/open-source-convergence\/wp-json\/wp\/v2\/posts\/30546\/revisions"}],"wp:attachment":[{"href":"https:\/\/euvolution.com\/open-source-convergence\/wp-json\/wp\/v2\/media?parent=30546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/euvolution.com\/open-source-convergence\/wp-json\/wp\/v2\/categories?post=30546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/euvolution.com\/open-source-convergence\/wp-json\/wp\/v2\/tags?post=30546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}