LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

AES 128 Encryption/Decryption in CBC Mode of Operation

Hello. I am a relative novice when it comes to encryption, but I would like to implement a function in LabVIEW to encrypt 16 bye vectors (represented as hex values) with LabVIEW.

 

I have discovered this AES encryption library which is desirable since it is free and open source, but there are two issues with it. #1, it operates on strings - not byte arrays. And #2, it only implements AES 128 in the counter mode of operation - not CBC.

 

As for the first problem, I think I can solve that simply enough. The strings are converted into byte arrays relatively early on, so I can supply the byte array to encrypt and the key directly as byte arrays with some simple modifications (I think).

 

The second problem may be a little more complicated. The various AES modes of operation seem to be well-defined here. And this leads me to think that perhaps the primary difference between the CBC and Counter modes of operation in AES is only the initialization vector (IV). The IV in the open source AES library I linked is generated from the current time and can optionally be wired to a constant for debugging purposes.

 

Does anyone know if that would be a reasonable path to take if I were trying to implement AES 128 in the CBC mode of operation? Any pointers on how the open-source AES library could be modified to support CBC? I have seen many forum posts advising against implementing your own cipher, so I can understand hesitation around considering this method.

 

The next best option I can think of would be to use something like an AES encryption and decryption DLL compiled from C code, but I am not sure where to acquire one of those or how exactly to generate a DLL from C code (I have effectively 0 experience with C).

 

Sans those options, I see that there is also this library which is unfortunately not free or open sourced, but does seem to support the CBC mode of AES encryption. Upon inspecting the package in VIPM, it seems like it may only be supported for LabVIEW for FPGAs. Is that true? Or does it also work in standard LabVIEW running on a Windows PC?

 

Thank you! I appreciate your support!

 

 

 

 

0 Kudos
Message 1 of 1
(1,316 Views)