Can I encrypt AES ECB data in a Windows phone?

I am trying to encrypt data using AES (ECB) . How can i do this. I tried the AES class, but it has no way to set the mode. Is there another way? Are any available Windows AES phones available that implement ECB mode of operation?

Thanks and Regards

Vaysage

+4
source share
6 answers

Answer: No, or at least not with the standard AesManaged class. Silverlight in all its current variants does not support the Mode property and always uses CBC.

+3
source

I could not find a free library.

In some projects, I had to "lean back" on RijndaelManaged (block size is 128). It works well if you need to consume web services in another language (AES + CBC + PKCS5Padding)

This will not help if there is a requirement for stict for AES (ECB): /

+1
source

There is a Bouncy Castle port for Silverlight, and it has what you need. If you do not want to recompile it for Windows Phone for yourself, you can take the dll from this place: Awkward Coder Blog

+1
source

I don't know the standard .NET library very well, but does it help? C # AES-256 Encryption

0
source

Do you mean that you are using System.Security.Cryptography.Aes.Create ?

This will return either an Aes object (either AesCryptoServiceProvider or AesManaged ), and they all inherit from SymmetricAlgorithm , which has Mode, you can set the value to CipherMode.ECB.

0
source

However you can. Use IV as zeros and encrypt block by block (16 bytes / 128 bits) rather than stream. Each block must have an IV filled with zeros and it will simulate an ECB.

0
source

Source: https://habr.com/ru/post/1339987/


All Articles