Java Doc for PKIApplet.java in  » 6.0-JDK-Modules » j2me » com » sun » satsa » pkiapplet » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » com.sun.satsa.pkiapplet 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.sun.satsa.pkiapplet.PKIApplet

PKIApplet
public class PKIApplet extends Applet (Code)
Card side application for PKI implementation. Supports subset of WIM functionality.


Field Summary
final static  byteINS_MSE
     INS byte for command APDU.
final static  byteINS_NEW
     INS byte for command APDU.
final static  byteINS_PSO
     INS byte for command APDU.
final static  byteINS_READ
     INS byte for command APDU.
final static  byteINS_SELECT
     INS byte for command APDU.
final static  byteINS_UPDATE
     INS byte for command APDU.
final static  byteINS_VERIFY
     INS byte for command APDU.
 byte[]PIN_REFs
     PIN identifiers.
 OwnerPIN[]PINs
     PIN objects.
 DFilebase
     Root DF for WIM application.
 Ciphercipher
     Cipher object.
 Filecurrent
     Currently selected file.
 MessageDigestdigest
     MessageDigest object for key hash calculation.
final static  shortdigestLength
     DigestInfo structure size for RSA signature.
 booleanisKeyFileSet
     Flag that indicates that private key path was set properly.
 booleanisSERestored
     Flag that indicates that SE is restored.
 shortkeyNum
     Private key number for signature generation.
 PrivateKey[]keys
     Private keys.
static  byte[]signBuffer
     Temporaru buffer for RSA signature.
static  booleansupportKeyGeneration
     If false, key generation is disabled.
 DFiletop
     Root DF for entire file structure.
static  shortunusedKeys
     Number of unused keys.
static  booleanverifyPINs
     If false, applet always report that PINs are validated.
final static  bytex0
     Constant that is used to avoid '(short) x' notation.
final static  bytex1
     Constant that is used to avoid '(short) x' notation.
final static  bytex2
     Constant that is used to avoid '(short) x' notation.
final static  bytex3
     Constant that is used to avoid '(short) x' notation.
final static  bytex4
     Constant that is used to avoid '(short) x' notation.
final static  bytex5
     Constant that is used to avoid '(short) x' notation.
final static  bytex6
     Constant that is used to avoid '(short) x' notation.
final static  bytex8
     Constant that is used to avoid '(short) x' notation.

Constructor Summary
 PKIApplet()
     Constructor.

Method Summary
public  voiddeselect()
     Called by the JCRE to inform this applet that it has been deselected.
static  byte[]encodePublicKey(RSAPublicKey pk, byte[] data)
     Generates DER encoded RSA public key.
static  shortgetDERSize(short i)
     Returns the size of DER object for given value size.
 FilegetFile(byte[] data, short index, short l)
     Returns file object specified by path in the buffer.
 byte[]getKeyHash(RSAPublicKey pk, byte[] data)
     Calculates identifier for public RSA key.
 voidinit()
     Initialises the WIM data structures.
public static  voidinstall(byte[] bArray, short bOffset, byte bLength)
     To create an instance of the Applet subclass, the JCRE will call this static method first.
public  booleanisValidated(OwnerPIN pin)
     Verifies that PIN is validated.
 voidmanageSE(APDU apdu)
     Hanldes MANAGE SECURITY ENVIRONMENT APDUs.
 voidnewKey(APDU apdu)
     Allocates new key and, if necessary, PIN.
Parameters:
  apdu - the command APDU.
public  voidprocess(APDU apdu)
     Main entry point.
static  shortputLength(byte[] data, short offset, short length)
     Places encoded length of DER object into the buffer.
 voidread(APDU apdu)
     Handles READ BINARY APDU.
 FilereadFile(DFile parent)
     Creates new file object.
public  booleanselect()
     Called by the JCRE to inform this applet that it has been selected.
 Fileselect(short id)
     Selects the file specified by file identifier.
 voidselectFile(APDU apdu)
     Handles SELECT FILE APDU.
 voidsign(APDU apdu)
     Handles PSO-CDS APDU command.
 voidupdate(APDU apdu)
     Handles UPDATE BINARY apdu.
 voidverify(APDU apdu)
     Handles PIN related APDUs.

Field Detail
INS_MSE
final static byte INS_MSE(Code)
INS byte for command APDU.



INS_NEW
final static byte INS_NEW(Code)
INS byte for command APDU.



INS_PSO
final static byte INS_PSO(Code)
INS byte for command APDU.



INS_READ
final static byte INS_READ(Code)
INS byte for command APDU.



INS_SELECT
final static byte INS_SELECT(Code)
INS byte for command APDU.



INS_UPDATE
final static byte INS_UPDATE(Code)
INS byte for command APDU.



INS_VERIFY
final static byte INS_VERIFY(Code)
INS byte for command APDU.



PIN_REFs
byte[] PIN_REFs(Code)
PIN identifiers.



PINs
OwnerPIN[] PINs(Code)
PIN objects.



base
DFile base(Code)
Root DF for WIM application. All relative paths start from here.



cipher
Cipher cipher(Code)
Cipher object.



current
File current(Code)
Currently selected file.



digest
MessageDigest digest(Code)
MessageDigest object for key hash calculation.



digestLength
final static short digestLength(Code)
DigestInfo structure size for RSA signature.



isKeyFileSet
boolean isKeyFileSet(Code)
Flag that indicates that private key path was set properly.



isSERestored
boolean isSERestored(Code)
Flag that indicates that SE is restored.



keyNum
short keyNum(Code)
Private key number for signature generation.



keys
PrivateKey[] keys(Code)
Private keys.



signBuffer
static byte[] signBuffer(Code)
Temporaru buffer for RSA signature.



supportKeyGeneration
static boolean supportKeyGeneration(Code)
If false, key generation is disabled.



top
DFile top(Code)
Root DF for entire file structure.



unusedKeys
static short unusedKeys(Code)
Number of unused keys.



verifyPINs
static boolean verifyPINs(Code)
If false, applet always report that PINs are validated.



x0
final static byte x0(Code)
Constant that is used to avoid '(short) x' notation.



x1
final static byte x1(Code)
Constant that is used to avoid '(short) x' notation.



x2
final static byte x2(Code)
Constant that is used to avoid '(short) x' notation.



x3
final static byte x3(Code)
Constant that is used to avoid '(short) x' notation.



x4
final static byte x4(Code)
Constant that is used to avoid '(short) x' notation.



x5
final static byte x5(Code)
Constant that is used to avoid '(short) x' notation.



x6
final static byte x6(Code)
Constant that is used to avoid '(short) x' notation.



x8
final static byte x8(Code)
Constant that is used to avoid '(short) x' notation.




Constructor Detail
PKIApplet
PKIApplet()(Code)
Constructor.




Method Detail
deselect
public void deselect()(Code)
Called by the JCRE to inform this applet that it has been deselected. When invoked PIN-G should be reset.



encodePublicKey
static byte[] encodePublicKey(RSAPublicKey pk, byte[] data)(Code)
Generates DER encoded RSA public key.
Parameters:
  pk - the key
Parameters:
  data - temporary data buffer DER encoded RSA public key



getDERSize
static short getDERSize(short i)(Code)
Returns the size of DER object for given value size.
Parameters:
  i - the value size the size of DER object



getFile
File getFile(byte[] data, short index, short l)(Code)
Returns file object specified by path in the buffer.
Parameters:
  data - the buffer
Parameters:
  index - path offset
Parameters:
  l - path length file object or null if not found



getKeyHash
byte[] getKeyHash(RSAPublicKey pk, byte[] data)(Code)
Calculates identifier for public RSA key.
Parameters:
  pk - the key
Parameters:
  data - temporary data buffer the identifier



init
void init()(Code)
Initialises the WIM data structures.



install
public static void install(byte[] bArray, short bOffset, byte bLength)(Code)
To create an instance of the Applet subclass, the JCRE will call this static method first.
Parameters:
  bArray - the array containing installation parameters
Parameters:
  bOffset - the starting offset in bArray
Parameters:
  bLength - the length in bytes of the parameter data in bArray



isValidated
public boolean isValidated(OwnerPIN pin)(Code)
Verifies that PIN is validated.
Parameters:
  pin - the PIN true if the PIN is validated or PIN verification is disabled.



manageSE
void manageSE(APDU apdu)(Code)
Hanldes MANAGE SECURITY ENVIRONMENT APDUs.
Parameters:
  apdu - command APDU



newKey
void newKey(APDU apdu)(Code)
Allocates new key and, if necessary, PIN.
Parameters:
  apdu - the command APDU. APDU data contains key type(byte, 0 - authenticatiuon, 1 - non-repudiation), key lenght inbits (2 byte value). For non-repudiation key after that goesinitial PIN value (8 bytes) and label (32 bytes). If p1 = 1the command just verifies that a new key can be generated.



process
public void process(APDU apdu)(Code)
Main entry point.
Parameters:
  apdu - command APDU



putLength
static short putLength(byte[] data, short offset, short length)(Code)
Places encoded length of DER object into the buffer.
Parameters:
  data - the buffer
Parameters:
  offset - offset in the buffer where the length must beplaced
Parameters:
  length - the length to be placed the new offset



read
void read(APDU apdu)(Code)
Handles READ BINARY APDU.
Parameters:
  apdu - command APDU



readFile
File readFile(DFile parent)(Code)
Creates new file object.
Parameters:
  parent - parent DF for this file the new file object



select
public boolean select()(Code)
Called by the JCRE to inform this applet that it has been selected. When invoked first time initialises the file system. true



select
File select(short id)(Code)
Selects the file specified by file identifier.
Parameters:
  id - file identifier selected file



selectFile
void selectFile(APDU apdu)(Code)
Handles SELECT FILE APDU.
Parameters:
  apdu - command APDU



sign
void sign(APDU apdu)(Code)
Handles PSO-CDS APDU command.
Parameters:
  apdu - command APDU



update
void update(APDU apdu)(Code)
Handles UPDATE BINARY apdu.
Parameters:
  apdu - command APDU



verify
void verify(APDU apdu)(Code)
Handles PIN related APDUs.
Parameters:
  apdu - command APDU



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.