Questions tagged [aescryptoserviceprovider]
68 questions
1
vote
1 answer
How to generate 64 Bit encrypted key in AES128 algorithm?
I am new to encryption concepts. I am working on a small project, I need to encrypt the content using the AES128 algorithm. The receiver needs a 64 bit encrypted key for decrypting.
But, I think the key is generated in AES128 based on a String. Then…

user3099091
- 21
- 1
- 5
1
vote
1 answer
Decrypting AES encrypted string in C#
I am trying to decrypt an AES encrypted string from Java, in C#. When I decrypt, it returns gibberish and does not match the original plain text, which was encrypted via Java code. Pls guide me on what is going wrong here.
Attached the Java code for…

csharpnewbie
- 789
- 2
- 12
- 33
1
vote
1 answer
Encryption AES 256 Input Plaintext Length Issue
From my security team, they want me to use AES256 key strength and CBC mode. My code only works when I enter a input plaintext of 32 letters in length now after changing to 256 CBC and block size to 128.
If I enter "This is a test" (not 32…

moto_geek
- 510
- 5
- 14
1
vote
1 answer
AesCryptoServiceProvider decrypt
I am attempting to decrypt using this function but I am unsure what is causing it to fail
public string Decrypt(byte[] cipherText, byte[] IV, byte[] key)
{
using (AesCryptoServiceProvider AESDecrypt = new AesCryptoServiceProvider())
…

Anthony
- 913
- 3
- 23
- 32
1
vote
2 answers
My AES Intitialization Vectors seem to do nothing with AESCryptoServiceProvider in C#
I have been doing some research into using AESCryptoServiceProvider in C#. So far, I have an implementation which seems to be working. However, my understanding of initialization vectors is that it should protect my cipher text from being the same…

Adam Shaver
- 133
- 1
- 6
1
vote
0 answers
first few characters lost during decryption
I am using AES CBC encryption in VB.Net and decryption is done using AS3Crypto. First few characters (about 16) are missing during decryption and replaced with random characters like below.
05[ÚðÊ\ÃPôôÄ]óbR
Here is my .net code. On AS3Crypto demo…

Laurence
- 7,633
- 21
- 78
- 129
1
vote
1 answer
How to protect AesCryptoServiceProvider's rgbKey?
We have table where we keep user/password and some other data. Each record's password field must be encrypted. We decided to use AesCryptoServiceProvider for encryption and manually created rgbKey for one time. Then encrypted all the user passwords…

Nazim
- 639
- 2
- 10
- 26
1
vote
0 answers
VB.NET AES error "Padding is invalid and cannot be removed" same key/iv and final block flushed
I use AesCryptoServiceProvider in order to perform encryption and decryption using AES.
Encryption seems to work, but decryption throws an exception saying "Padding is invalid and cannot be removed".
Here is my code:
Public Function AESEnc(ByVal…

Seymour Saffel
- 13
- 3
0
votes
2 answers
AES round trip producing random chars
So here's my mess. It returns random Unicode chars. I'm having it use the same key for both methods, as well as the same IV, and I'm using the same encoding for both of them. What's causing the random response?
using System;
using System.IO;
using…

Andrew Mock
- 99
- 1
- 1
- 7
0
votes
0 answers
I am getting error "the input data is not a complete block" in decryption using AES/CBC/Pkcs7 algorithm in C#
public static string Decryptss(string cipherText, string symkey)
{
try
{
return DecryptStringFromBytes_Aes(Convert.FromBase64String(cipherText), Encoding.UTF8.GetBytes(symkey), new byte[16]);
}
catch (CryptographicException…
0
votes
0 answers
AESCryptoServiceProvider Java equivalent
Is there an equivalent to the aforementioned class in Java? I need a function that is given a string to encrypt, an encryption key, a salt and returns the encrypted string.

StudentOfTheGame
- 163
- 1
- 2
- 13
0
votes
0 answers
Java large file AES Encryption is very slow
I'm trying to encrypt a 512 Mb file with AES/CBC algorithm. It is taking around 7 sec which is too much. How to reduce the encryption time and make it faster.
I'm using a fixed key and tried using CipherOutStream as well as cipher.update() instead…
0
votes
2 answers
AesCryptUtil cannot be resolved to a type in a ccAvenue Payment gateway
I am integrating ccAvenue payment gateway in spring mvc project where I add following 3 files
1. dataForm.html
2. ccavRequestHandler.jsp
3. ccavResponseHandler.jsp
I have pay button in my project when I click on pay button then it redirects to…
0
votes
1 answer
How to make AesEncrypterHandler encrypt the same way as Aes does
I am trying to use AesCryptoServiceProvider to achieve the same encryption mechanism as Aes.
Here is my AesCryptoServiceProvider version of it:
public string version1(string plainText, string encryptionKey, string initializationVector)
…

cxc
- 201
- 2
- 10
0
votes
1 answer
Working with AES Encryption Java to C#
We have the application done C# and passing parameter to Java application. To make it secure we Java application developer come up with AES encryption. The developer gave sample code in Java. Kindly somebody helps me. How can I encrypt same way in…

Milind
- 1,855
- 5
- 30
- 71