Oracle Cryptographic Toolkit Programmer's Guide Release 2.0.4 A54082-02 |
Library | Product | Contents | Index

# 2
Data Types

This chapter discusses Oracle Cryptographic Toolkit external datatype codes. The following topics are covered:

- "Data Types"
- "Data Structures"

## 2.1 Data Types

Each data type name and its corresponding data type prefix used in the Oracle Cryptographic Toolkit is listed as a subheading below. The table below each subheading lists the possible data type values and their corresponding descriptions.

### 2.1.1 Name Prefixes

Each data type used in the Oracle Cryptographic Toolkit has a unique prefix. Following is a list of Oracle Cryptographic Toolkit data type names and prefixes.

##### Table 2-1 Data Types

Data Type Name | Prefix Used
--- | ---
Crypto Engine State | nzttces_
Crypto Engine Functions | nzttcef_
Identity Type | nzttidenttype_
Cipher Types | nzttciphertype_
TDU Formats | nztttdufmt_
Validate State | nzttvalstate_
Unique ID | nzttid_
Timestamp | nztttstamp_

### 2.1.2 Crypto Engine State

`nzttces` Enumerated type listing the current state of the cryptographic engine (CE).

States are:

#####

NZTTCES_CONTINUE | Continue processing input
NZTTCES_END | End processing input
NZTTCES_RESET | Reset processing and skip generating output

### 2.1.3 Crypto Engine Functions

`nzttcef` Enumerated type to show the cryptographic engine categories.

Types are:``

NZTTCEF_DETATCHEDSIGNATURE | Signature, detached from content
--- | ---
NZTTCEF_SIGNATURE | Signature, combined with content
NZTTCEF_KEYEDHASH | Keyed hash/checksum
NZTTCEF_HASH | Hash/checksum
NZTTCEF_RANDOM | Random byte generation
NZTTCEF_LAST | Used for array size

### 2.1.4 Identity Type

`nzttIdentType` Enumerated type to indicate the type of identity.

Types are:``

NZTTIDENTTYPE_X509v1 | X.509v1
NZTTIDENTTYPE_X509v3 | X509v3
NZTTIDENTTYPE_SYMMETRIC | Symmetric

### 2.1.5 Cipher Types

`nzttCipherType` Enumerated type listing all possible cryptographic algorithms.

Types are:

NZTTCIPHERTYPE_MD5 | MD5
NZTTCIPHERTYPE_SHA | SHA

### 2.1.6 TDU Formats

`nzttdufmt` Enumerated type listing all possible toolkit data unit (TDU) formats. Depending on the function and cipher used, some may not be available.

Types are:

NZTTDUFMT_PKCS7 | PKCS7 format
NZTTDUFMT_RSAPAD | RSA padded format
NZTTDUFMT_ORACLEv1 | Oracle v1 format

### 2.1.7 Validate State

`nzttValState` Enumerated type listing states an identity can be in.

States are:

NZTTVALSTATE_NONE | Needs to be validated
NZTTVALSTATE_GOOD | Validated
NZTTVALSTATE_REVOKED | Failed to validate

### 2.1.8 Unique ID

`nzttid`

#####

nzttID | Unique IDs for personas and identities represented with 128 bits

### 2.1.9 Timestamp

`nztttstamp`

#####

nzttTStamp | Timestamp as a 32 bit quantity in UTC

## 2.2 Data Structures

Following is a list of Oracle Cryptographic Toolkit data structures. Each data structure is listed along with a brief description.

##### Table 2-2 Data Structures and Descriptions

Name of Data Structure | Description
--- | ---
nzttBufferBlock | This is an output parameter block used to describe each buffer
nzttWallet | The Wallet structure contains a list of personas stored in that wallet and private wallet information
nzttPersona | The Persona structure contains information about a persona
nzttIdentity | The Identity structure contains information about an identity

### 2.2.1 nzttBufferBlock

A function uses an output parameter block to describe each buffer when that function needs to fill (and possibly grow) an output buffer. The flags_nzttBufferBlock member tells the function whether the buffer can be grown. The buffer is automatically reallocated when flags_nzttBufferBlock is 0.

The buflen_nzttBufferBlock member is set to the length of the buffer before the function is called and equals the length of the buffer when the function is finished. If buflen_nzttBufferBlock is 0, then the initial pointer stored in buflen_nzttBufferBlock is ignored.

The usedlen_nzttBufferBlock member is set to the length of the object stored in the buffer when the function is finished. If the initial buffer had a non zero length, then it is possible that the object length is shorter than the buffer length.

The buffer_nzttBufferBlock member is a pointer to the output object. Refer to Table 2-3, "nzttBufferBlock".

##### Table 2-3 nzttBufferBlock

Type | Name | Description
--- | --- | ---
uword | flags_nzttBufferBlock | Flags
size_t | buflen_nzttBufferBlock | Total length of buffer
size_t | usedlen_nzttBufferBlock | Length of buffer actually used
ub1 | *buffer_nzttBufferBlock | Pointer to buffer

### 2.2.2 nzttWallet

The wallet structure contains one or more personas. Each of these personas contains its private key, its identity, and trusted third party identities. All identities are qualified with trust where the qualifier can indicate anything from untrusted to trusted for specific operations. Refer to Table 2-4, "nzttWallet".

##### Table 2-4 nzttWallet

Type | Name | Description
--- | --- | ---
size_t | npersona_nzttWallet | Number of personas in the wallet
nzttPersona | list_nzttWallet | List of personas in the wallet
nzttWalletPrivate | private_nzttWallet | Private wallet information

### 2.2.3 nzttPersona

The persona structure contains information about a persona. Refer to Table 2-5, "nzttPersona".

##### Table 2-5 nzttPersona

Type | Name | Description
--- | --- | ---
nzttIdentity | myidentity_nzttPersona | My identity
size_t | nidents_nzttPersona | Number of trusted identities
nzttIdentity | list_nzttPersona | List of trusted identities
nzttPersonaPrivate | private_nzttPersona | Opaque part of persona

### 2.2.4 nzttIdentity

The identity structure contains information about an identity. Refer to Table 2-6, "nzttIdentity".

##### Table 2-6 nzttIdentity

Type | Name | Description
--- | --- | ---
size_t | aliaslen_nzttIdentity | Length of alias
text | alias_nzttIdentity | Alias
size_t | commentlen_nzttIdentity | Length of comment
text | comment_nzttIdentity | Comment
nzttIdentityPrivate | private_nzttIdentity | Opaque part of identity

Prev | Next
| Copyright © 1997 Oracle Corporation. All Rights Reserved. |
Library | Product | Contents | Index