_____________________________________________________ | | | [application/user] | |___________________________________________________| | | | set_msg | |___________________________________________________| | | | ops | |___________________________________________________| | | | | | cache_ctx | log_ctx | pkcs7 | |_____________|_____________|_______________________| | | | | | | store | asn1 | | TIPEM | |__________________|__________________| |_________| | | | | | | util | a2c | | BSAFE | |__________________|__________________| |_________| | | | | alloc_ctx | io_ctx | |__________________|__________________| | | | error_ctx | |_____________________________________|Higher layers rely on the services provided by lower layers, while lower layers are oblivious to the higher layers. Unfortunately, there is one exception to this rule: encrypting data under OAEP padding requires a layering violation because OAEP processing, which is a cryptographic procedure (and thus at a lower layer), is specified in SET such that it requires knowledge of SET-specific data types. However, SET-specific data types are defined in higher layers.
From bottom to top, a short description of each module is provided below.
error_ctx
passed
in as a parameter permits error information, beyond the numeric return
value, to be obtained by the application programmer. The
error_ctx
module also
provides functions useful to the programmer for logging errors and for
obtaining textual descriptions of return values.
io_ctx
I/O abstraction.
The interface for this module uses a subset of the interface defined by
the stdio I/O package. Two io_ctx
implementations are provided with
SETREF: io_ctx_stdio
, which is
implemented
using the stdio package, and
io_ctx_memio
,
which keeps data in-core.
alloc_ctx
is a memory allocation abstraction
based on the standard malloc allocator package.
SETREF uses application-programmer-supplied heaps to allocate any
memory that is "passed back" to the application programmer.
a2c
provides an ASN.1/DER processing runtime which is used by most of
SETREF.
This runtime may at times be used by the application programmer, for
instance for decoding X.509 Distinguished Names.
x509.h
,
pkcs7.h
, and
asn1set.h
)
used by SETREF, and
the DER encoding information used by the ASN.1/DER runtime. This
information is generated through automatic means
from the ASN.1 supplied in the SET specification.
The application programmer uses the data definitions as the fundamental
SET datatypes. The DER encoding information (which is contained in
x509.c
, pkcs7.c
, and
asn1set.c
) should be ignored by the application programmer
as it is only meaningful to the ASN.1/DER runtime.
DigestedData
.
The application programmer will never access this module
directly.
RRPID
and/or XID
of messages that have been processed. This
information is used primarily to detect repeated/replayed
messages.
SETREF expects there to be a single, global log file which
the user manages. Although SETREF provides an example
log_ctx
which uses a simple file-based database,
it is expected that
application programmers will supply implementations for
log_ctx
that
support local implementation requirements rather than using the
example implementation provided with SETREF.
cache_ctx
which uses a simple file-based database,
it is expected that
application programmers will supply cache_ctx
implementations that support local implementation requirements
rather than using the
example implementation provided with SETREF.
S()
for the signature operation and E()
for the public-key
encryption operation. Nearly all cryptographic functionality in SET is accessed
using these primitive operators. The application programmer will
never access this module directly.
set_msg
is the module that the application programmer
will most commonly use.
This module organizes and performs all SET-specific protocol processing
and provides the interface for sending and receiving SET messages.
Copyright © 1996, 1997, Visa International Service Association and MasterCard International Incorporated
All Rights Reserved.