Click here to Skip to main content
15,881,248 members
Everything / AES

AES

AES

Great Reads

by CPallini
An assembly implementation of the AES-128 cipher algorithm for the 8051 microcontroller
by adriancs
Communication between Arduino and C# (ASP.NET) by using AES encrypted HTTP GET request
by raddevus
Fully working sample code and explanation of everything necessary to create authenticated encryption with AES256.
by APE-Germany
A simple class which allows to encrypt/decrypt a string with a password (AES/SHA2)

Latest Articles

by adriancs
Communication between Arduino and C# (ASP.NET) by using AES encrypted HTTP GET request
by raddevus
Fully working sample code and explanation of everything necessary to create authenticated encryption with AES256.
by CPallini
An assembly implementation of the AES-128 cipher algorithm for the 8051 microcontroller
by Marijan Nikic
A short and easy text (file) encryption

All Articles

Sort by Score

AES 

14 Nov 2019 by CPallini
An assembly implementation of the AES-128 cipher algorithm for the 8051 microcontroller
19 Aug 2023 by adriancs
Communication between Arduino and C# (ASP.NET) by using AES encrypted HTTP GET request
14 Dec 2018 by OriginalGriff
No. You can't encrypt data into a fixed size at all, and particularly not into a small number of bits: if you could, why would we stream movies as 10GB lumps, web pages as huge chunks of "text"? We'd just encrypt them to 24 char alpha values and send that instead. Why would we store files on...
3 Jun 2019 by OriginalGriff
Yes ... but it's not a good idea. Remember, Javascript is interpreted in the browser - so the full code is sent to the client in a human readable form, which can be viewed in detail by anyone with access to an F12 key. So static salt in JS is pretty much the same as "no salt" because it is...
11 Sep 2020 by Garth J Lancaster
You need to ensure things like the IV and Padding (and obviously, cypher, cypher mode) are the same ... In your case, for instance, in the java I dont know what IV is generated, and you're using PKCS5 padding .. in C#, you set an IV, and use...
12 Nov 2021 by Richard Deeming
Forget "encrypting" the password on the client. Just use HTTPS for your site. That way, all of the communication between your server and your users is protected from eavesdropping and modification: Troy Hunt: Here's Why Your Static Website Needs...
25 Oct 2022 by Richard Deeming
You seem to be throwing strings at the Convert.FromBase64String method without understanding the content of the string, nor the purpose of the method. In fact, none of the strings in your code are Base64-encoded[^]. Your key and IV are simply...
24 May 2019 by OriginalGriff
Not like that! Never concatenate strings to build a SQL command. It leaves you wide open to accidental or deliberate SQL Injection attack which can destroy your entire database. Always use Parameterized queries instead. When you concatenate strings, you cause problems because SQL receives...
3 Jun 2019 by F-ES Sitecore
Any keys\secrets you use to encrypt data in javascript are visible by the client which is why people don't user javascript for encryption. To preempt your next question, no you can't stop people looking at the javascript\secrets, you can't disable view source, you can't disable the browser tools.
25 Jun 2021 by Richard MacCutchan
See Cryptography API: Next Generation - Win32 apps | Microsoft Docs[^]. Encryption does not care what data it works on, so you can do it by treating all files as streams of bytes.
12 Nov 2021 by OriginalGriff
You cannot encrypt AES without the same key you need for decryption, regardless of where you encrypt, that will be a vulnerability as the encryptor needs the key in clear to do it's job. Have you considered Public Key encryption? The public key...
30 Jun 2022 by raddevus
Fully working sample code and explanation of everything necessary to create authenticated encryption with AES256.
25 Oct 2022 by Gaby94
Hi! I have two apps that communicate between them with encrypted data. Nodejs app sends the encrypted data and the WEBAPI made in C# receive it and decrypt it. My problem is when I'm trying to decrypt AES encrypted data I receive this error : ...
28 May 2016 by Garth J Lancaster
The obvious thing is that the parameters for whatever libraries you're using on each side have to be the same - there are too many to name here, padding is the usual one that gets messed up (and would be consistent with the error you saw) here's a link to someone who says they have working...
31 Oct 2016 by Member 10390715
I am beginner in crytography.I try to use ECDH-192 bit to create secret key for AES encryption. It is possible or not? If possible, I want to implement this model in android. Please show me some example or guide line.Merci beaucoup.What I have tried:I try to implement ECDH and AES
31 Oct 2016 by Richard MacCutchan
Android Explorations: Using Password-based Encryption on Android[^].
1 Dec 2016 by Michael Waters
I've searched for some time for a PCL implementation of the features provided by the System.Security.Cryptography namespace, and have met with less than satisfactory results. I only truly need DEcryption (both asymmetric and symmetric) in a PCL assembly, as I can handle encryption of the data...
1 Dec 2016 by Jason Gleim
Might look at the PCL Crypto library. It's a NuGet package that implements the most common crypto stuff. I can't vouch for it's security as I don't know if it has been through an audit or not but it may work for what you want to do.From Package Manager Console:Install-Package PCLCrypto
24 Feb 2018 by Maciej Los
Follow this: encryption - Simple Java AES encrypt/decrypt example - Stack Overflow[^] This might be helpful too: Example of AES encryption and decryption in Java · GitHub[^]
17 Jul 2018 by R. B. Krish
Hi Code project mates, I have a serious problem with encryption and decryption. What I have is a folder which can be in varied sizes but can have an amount 100 GB or so. My project need: The need is when I log off the system the windows service I have created should encrypt the folder(which is...
30 Jul 2018 by ranio
I am doing AES Key Generation in c# and passing the key generated for AES 128 bit Encryption. The case is while generating the key I am getting byte length as 16 while the key string length is getting higher than 16. While trying online I am getting length as 16 itself. What I have tried: Core...
15 Dec 2018 by Patrice T
Quote: Is there any way to encrypt the whole Input data into 16 to 24 character alphanumeric string and again able to decrypt it into normal string in c#? Yes, only if input is no more than 24 characters alphanumeric string. Beware, with utf-8, some characters are encoded on more than an 8 bits...
8 Feb 2019 by CPallini
Some remarks: Encryption is not compression. If you are looking for way to reduce the size of your data, then you should search for compression algorithms. Usually encryption algorithms (e.g. the AES you tagged your question with ) produce binary data. You may represent such binary output...
31 Mar 2019 by Member 14205873
Hi i have the following code for decryption similar to openssl. I am looking for java code for encryption that mimics openssl -aes-256-cbc -a -salt with given string and a password. Any clue/help is appreciated. import java.nio.charset.Charset; import java.security.MessageDigest; import...
24 May 2019 by dyooshi
Im doing a registration and login form where I already encrypted the password when user entered the password in registration phase. So for login I know that I need to compare the encrypted password in database with the newly entered encrypted password during login. I dont know if im missing some...
2 Jul 2019 by Member eric67
Hi there , I'm trying to use the AES Class within Visual C# While coding a message, it occcured to me that trying to encode a 16 bytes Block message with AES give 2*16 bytes encrypted blocks ( like my message was 32 bytes long). It does the same for 2* 16 bytes blocks messages, where 3*16...
15 Aug 2020 by Garth J Lancaster
"but not work for me" - that's a pretty useless description - why would you do openssl AES encryption in C# when the framework has it build in - Aes Class (System.Security.Cryptography) | Microsoft Docs[^]
11 Sep 2020 by Member 14901669
A scenario like API developed in Java and have to consume in asp.net C#. The problem is with encryption and decryption of payload. Algorithm AES-256 , the generated encrypted text in c# is not matching with Java. Kindly help. Thanks in Advance. ...
7 Nov 2020 by RickZeeland
See remark here: Aes128.Encrypt Method (String, String, Mode, String)[^] For ECB and CBC modes, the length of the decoded input bytes must be an exact multiple of the block length (16 bytes). The examples seem to be for the CryptoSys...
10 Jul 2021 by Dave Kreskowiak
Well, first of all, you listed 9 columns you said you were going to have values for, but then you listed 10 values to pout into those columns. Those two lists much match and they don't! Next, if your emp_id is an AUTOINCREMENT, or equivalent,...
19 Apr 2022 by kandy 2022
suppose you ask user to generate public_key using JPasswordField and then you should take this public_key to encrypt random_key what should I do? What I have tried: public void AESEncryption(File file) throws FileNotFoundException,...
15 Jul 2022 by Rida Kamran
I am working on code to encrypts any file to a chosen password and will automatically encrypt any download. An encryption page where you can encrypt or decrypt any file which you need to download. The thing is I have just written encryption code...
15 Jul 2022 by OriginalGriff
So basically, it doesn't work and you have no idea where the problem is: it could be the encryption or decryption section, or the file transfer, or the storage, or ... pretty much anything. So you need to go back to basics and work out what does...
16 Nov 2016 by APE-Germany
A simple class which allows to encrypt/decrypt a string with a password (AES/SHA2)
6 Aug 2015 by Huzifa Terkawi
This article will aim to give you a brief and to point tutorial about DES modes , hash Functions , AES , RSA algorithms and example of their usage , using OpenSSL.
29 Jun 2020 by OriginalGriff
That's funny: Google finds loads of 'em for me: aes-ccm in c language - Google Search[^] If you have tried several pieces of code and it doesn't work, start by asking the author(s) what is wrong - it's pretty likely that you are making the same...
15 Jun 2017 by Patrice T
Quote: How do I select which encryption and decryption algorithm is best C#? There is not answer to this question because we don't have the necessary information. We don't know how important are your files, nor the context. The answer for C# is the same as for any other language, because...
15 Jun 2017 by RickZeeland
Go for AES with 256bit key and CBC cipher mode if you want fast performance, because most modern hardware (CPU's) supports it. See this article for more information: Swanky Encryption/Decryption in C#[^]
16 May 2016 by Simon Bridge
Are they expecting you to actually implement the algorithm itself, or implement a system that uses it? (eg, Are you studying computer science, or mathematics?)The .NET framework already comes with AES level implementations in the System.Security.Cryptography namespace. If you actually...
28 May 2016 by Member 12350964
I am working on a project where i have to coordinate with .net team.. I need the equivalent code for the below mentioned AES encryption algorithm(written in C#) in objective -C.. I have tried using AESCrypt and CommonCrypt but its not woking well..getting different encryption value in both...
17 Jul 2018 by #realJSOP
You can use multi-threading to handle the encryption (fire off a few threads at a time so as not to bind the CPU up). You cannot encrypt a folder. You have to encrypt the files inside the folder. Here's a CP article that talks about AES encryption: FIPS Encryption Algorithms and...
28 Feb 2016 by Patrice T
Quote:I downloaded a book and a variety of documents but, I want a recommended curriculum, because I have only limited time, don't want to waste time in out of scope subjects Encryption is a huge subject, and what you ask is a shortcut to knowledge. There is no such thing as shortcut to...
28 Feb 2019 by Marijan Nikic
A short and easy text (file) encryption
23 Jan 2017 by normalsoft
I have to do an API request having AES algorithm with SHA256 with private key to sign payload data. While doing this i'm getting an exception "The request was aborted: Could not create SSL/TLS secure channel." In windows log it is showing thatAn SSL 3.0 connection request was received...
17 May 2017 by girlprogrammer
Securing table data at column level using AES-128 encryption
2 Jan 2016 by Member 10657083
I've made a program a while back that I just discovered was broken. Which is rather strange since it functions correctly on very certain file sizes.I've spend upwards of several days trying to figure out the issue however I am running out of ideas. So I am here to ask can someone spot the error...
25 Jun 2021 by OriginalGriff
Any DES encryption code will handle data "of any extension" as all files are binary data, and a stream or array of binary data is all you need to load in order to encrypt it. Text files are binary files that contain a "limited subset" of the...
1 Jun 2016 by Member 12181103
i managed to make a simple program that encrypt and decrypt a text in c# using the aes algorithm but i have a few questions:1) what is the best class and way to use the aes? cause i got those classes:AesManaged , RijndaelManaged , AesCryptoServiceProvider.2) i understand there is a key size...
15 Jun 2017 by prashureddy
I have to write a c# encryption and decryption for large files which are more than 200 MB. Please anyone provide the fast and secure algorithm suggestion for my problem What I have tried: I tried AES and DES Algorithms. But is taking time. I tried Partial-Encryption also. But its not given...
8 Feb 2019 by Member 12806413
Is there any way to encrypt the whole Input data into 16 to 24 character alphanumeric string and again able to decrypt it into normal string in c#? What I have tried: Is there any way to encrypt the whole Input data into 16 to 24 character alphanumeric string and again able to decrypt it into...
29 Jun 2020 by Member 12957547
Hi, Can anyone provide an example of aes-ccm in c language What I have tried: I tried to search but no code is working
16 May 2016 by z3ngew
Hi everyone,I have a task to implement encryption AES military level and I really does not know anything about encryption, if someone can just suggest a curriculum for me to start learning, or recommend a certain book or course will be appreciated.Thanks in advance,z3ngewWhat I have...
1 Jun 2016 by Sergey Alexandrovich Kryukov
It's all wrong. The "fact" that a key is somehow related to some strings is nothing but your fantasy. If you generated a key from a string, it's your problem. All cryptographic keys are just arrays of bytes. (Please see Aes Class (System.Security.Cryptography)[^].) Also, you should understand...
1 Jul 2017 by Jomish John
Hello, Currently I am using Windows Server 2012 R2 Standard and the IIS version 6.2. The machine keys on IIS is currently set as SHA1 as Validation method and Auto as Encryption method. The tag present in Web.config file also consists of validation key, decryption key,...
24 Feb 2018 by Shameer.Abdul
I have been trying to do decryption in java for exact same decryption descibed in C# AES 256 bits Encryption Library with Salt[^] which is C# . But i am not able to get the same output , Could anybody assist. What I have tried: byte[] salt = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 }; ...
3 Jun 2019 by Prashant D Sonawane
I'm working on AES encryption I want to encrypt a string in JavaScript and using that ciphertext which is generated during encryption I want to decrypt it in JAVA. I want to use static SALT and IV on both side i.e. common SALT and IV. What actually I want is to avoid the use of API calls and...
7 Nov 2020 by Mr.H3
I want to use AES 128 ECB algorithm in securing message files. I have tried all the solutions available on the internet. But when I do manual calculations the results are different.Anyone have any code regarding this please share it with me that...
25 Jun 2021 by Marcel Waschnig
I need a way to encrypt and Decrypt a file of any extention with AES in C++. The Requirements for my Project: Encryption with AES256 Creating the AES Key from a Password the user enters I am not very good at C++ becouse i have just previously...
10 Jul 2021 by Nor Asyikin Binti Alim
i made a system to encrypt the data in database using AES-128. after the AES code applied, the data didnt insert into my system and database. can someone help me ? this for my final year project. i dont know what to do anymore. if i fail this...
12 Nov 2021 by Member 15421351
I want to avoid AES Key disclosure while doing encryption in client side and decryption in server side. I am doing the encryption via javascript and decryption in the server side during login process. I am using aes js file for the same....
15 Aug 2020 by vardhman shah
Hello, I have sample code in Java for your reference. public static String decryptOpenSSL(String key,String data) throws IOException, GeneralSecurityException{ OpenSSL opensll=new OpenSSL(); InputStream ...