Christmas is coming soon! To thank for the support from all our dear customers, Christmas promotional activity is going on in JavaCardOS online store. For more activities details, please check this post.

Question about DESKey

Algorithm School

Moderator: UNKNwYSHSA

dabluwt
Posts: 11
Joined: Wed Oct 12, 2016 11:47 pm
Points :104
Contact:

Question about DESKey

Post by dabluwt » Thu Dec 01, 2016 3:11 am

Can I create DESKey in transient memory? Will DESKey keep the key data permanently?

tay00000
Posts: 123
Joined: Tue Sep 27, 2016 10:58 am
Points :1598
Contact:

Re: Question about DESKey

Post by tay00000 » Thu Dec 01, 2016 6:07 am

Yes it can be transient memory key.

DESKey myDesKey = KeyBuilder.buildKey(KeyBuilder.TYPE_DES_TRANSIENT_RESET, KeyBuilder.LENGTH_DES, false);

Once you have finished using the myDesKey or whatever transient DES key or keys, just called myDesKey.clearKey(); or whatever key name with the clearKey() function. This will zeroize the key from memory. If by accident or chance your card's power were to trip or the card removed unexpectedly, the memory will also be cleared since it's RAM/transient in nature.

Look at the KeyBuilder API (http://www.javafind.net/library/111/jav ... mmary.html) and select your desired key type (DES, 2DES, 3DES ...etc...) and TRANSIENT_RESET or TRANSIENT_DESELECT type (read the API).

dabluwt
Posts: 11
Joined: Wed Oct 12, 2016 11:47 pm
Points :104
Contact:

Re: Question about DESKey

Post by dabluwt » Fri Dec 02, 2016 5:48 am

Thank you very much for your detailed answer. It helps me a lot . :lol:

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 1 guest

JavaCard OS : Disclaimer