Hi!
I think this is really tough question, but lets try.
I'm implementing small software in J2ME environment. Part of that software is to encrypt a small txt-file using a password based encryption. I'm using SATSA (Security And Trusted Services API, JSR177) for actual encryption. However, I need to generate a key for that encryption process. Key generation must be done using so called "slow funcktion". I have decided to use PBKDF2 algorithm for that purpose (see:
http://www.ietf.org/rfc/rfc2898.txt)
At the moment I have started to implement PBKDF2 for J2ME. I can do everything else, but I have a problem creating PRF (Pseudo Random Function), that is used in key generation process. I can' use Mac and SecretKeySpec classes, that are part of JavaSE:
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
Those classes are not in J2ME unfortunately.
Could somebody give me any hint, how I could create my own PRF for J2ME? Which algorithm to use? Are there anything ready for J2ME.
Br
Koot