Is there a proper way of doing an AES CMAC encryption in Java Cards?
After researching I've hit a roadblock wherein I cannot find any example or samples of Java card that has AES CMAC encryption. Is there any way or at least is it possible to do an AES CMAC encryption on a Java Card
There are three possibilities:
either you take a Java Card that has an extended API that supports AES-CMAC (certain JCOP cards for example);
you take a Java Card with API version 3.0.5 (very rare currently);
you implement AES-CMAC from scratch using the AES Cipher and Signature objects (this is possible and not too difficult, I did this some years ago).
Related
I am using cryptography to implement some blockchain application, after I looked code, I don't know how to distinguish SHA2-256 and SHA3-256.
The Elliptic Curve Digital Signature Algorithm (ECDSA) supports any hash function not limited to the SHA family, as MD5. SHA-3 should be supported, yes, indeed, I recommend using it as it is a open contest standard and improves security.
I want to build a client and server application using Socket programming that can chat but the client and server has to be implemented in different languages.
I want to use C# and Java for that purpose. I want to know if its possible and if it is How?Thanks
It is possible and pretty easy, especially with C# and Java. Their implementation of sockets is pretty similar.
Few things to watch for:
Make sure you are serializing integers in network order. If I remember correctly Java and .NET put bytes on the wire in a different order. See this post for some guidance.
Make sure you are encoding/decoding your strings consistently, like using Unicode on both sides.
Don't try using unsigned integer types, Java only supports signed types (I'm sure there are libraries to deal with it if necessary).
I don't know how compatible float and double serializations are on both sides, so if you need it do some more investigation.
Good luck and have fun!
I am trying to use Diffie Hellman for key exchange and AES to encrypt data with keys. Can anyone provide me a suitable work sample for android ?
I've actually been working on a similar problem lately myself. I don't have a working sample, but here are some points you should be aware of:
Android uses a partial Bouncy Castle package to handle most of its cryptography, but some people prefer to user their own cryptographic package (Spongy Castle is a commonly cited alternative) since Android's is incomplete. See the discussion in here.
If you choose to use Android's existing tools, you can access them through Cipher. Here is a useful list of algorithms Android supports.
Be aware that if you choose to use some non-Android Java crypto library, Android does not support all Java packages your library may need. See my (currently unanswered) question about how to deal with that in Spongy Castle.
Hope these help!
I need a push in the right direction - preferably with code samples/links - for how to encrypt an NSString using DES encryption algorithm. Knowing that it is not that secure, but a possible candidate for avoiding to file a CCATS.
Could commoncrypt be the solution?
Or would using the key chain or sqlcypher be able to provide encryption and avoid the CCATS paper work.
In my app, i dont see any issue with 56 bit security and i dont assume any issue with a symmetric key solution.
In short:
I can't find any good example of how to use 56bit DES symmetric encryption for my ios 4.2 app (This is to avoid the CCATS hassle)
Why don't you use the Security.framework?
As the title says. Using the iPhone SDK, I want to RSA encrypt some (small) plaintext using an existing key and exponent I am given from a server for authentication. Surely this is a trivial task that requires one library import and a couple of lines of code? If not, why not?
Unfortunately the only way to work with RSA keys on the iPhone is by importing them in the KeyChain. If you don't mind to use a third-party library then you can go around this. For example by using libcrypto from OpenSSL.