Today’s libraries do complicated things while providing easy interfaces. We’ll look into crypto version of this nice fashion, and see how serious crypto can be accomplished easily. Thanks to .Net (Core), all these processes will be inter-operable and cross-platform 😎
AES, being short for Advanced Encryption Standard, is actually a crypto method named Rijndael. It was selected by NIST, among other submitted proposals, to be “the AES” at 2001. It’s a symmetric-key algorithm, meaning the same key is used for both encrypting and decrypting the data.
AES can be run in many modes, we’ll be looking at GCM, Galois/Counter Mode…
With todays crypto techniques and open libraries, encryption is quite accessible. But I wanted to speak of a simple crypto method, for those who don’t want to store stuff in plain text and want an easy implementation.
Please be warned, this method should not be used for anything more important than basic non-private data, since it can be broken by an average attacker.
Code of the console app is in C#, using .Net Core 3.1 and written on Visual Studio. It can be adapted to any environment since it doesn’t depend on any crypto library.
Let’s look at the main…
Whether you are building apps for just macOS or for cross-platform, if your app is using OpenSSL for crypto-works, you will have to install OpenSSL library since macOS ships with LibreSSL. Furthermore, cross-platform cryptography in .Net Core and .Net 5 uses OpenSSL on macOS.
Installing OpenSSL library on macOS seems easy at first, but in practice can be a real pain in the back. Here is my journey of installing OpenSSL 1.1.1g on macOS Catalina (10.15.6) and making it reachable by my .Net Core apps. I tried to write complete and generalized instructions to be as applicable to more systems…
Cross-platform development is great, so is .Net Core. But, as of the time of this writing, .Net Core doesn’t provide a cross-platform windowed GUI. Let’s try to build a desktop app with a cross-platform GUI.
So, what options do we have?
Yes, .Net MAUI sounds quite nice. It will be the Microsoft-official way to build desktop and mobile GUIs. But it is in its early development phase for now, will be shipped later…