]> git.saurik.com Git - apple/security.git/blame - libsecurity_cryptkit/lib/CipherFileTypes.h
Security-55471.14.18.tar.gz
[apple/security.git] / libsecurity_cryptkit / lib / CipherFileTypes.h
CommitLineData
b1ab9ed8
A
1/* Copyright (c) 1998 Apple Computer, Inc. All rights reserved.
2 *
3 * NOTICE: USE OF THE MATERIALS ACCOMPANYING THIS NOTICE IS SUBJECT
4 * TO THE TERMS OF THE SIGNED "FAST ELLIPTIC ENCRYPTION (FEE) REFERENCE
5 * SOURCE CODE EVALUATION AGREEMENT" BETWEEN APPLE COMPUTER, INC. AND THE
6 * ORIGINAL LICENSEE THAT OBTAINED THESE MATERIALS FROM APPLE COMPUTER,
7 * INC. ANY USE OF THESE MATERIALS NOT PERMITTED BY SUCH AGREEMENT WILL
8 * EXPOSE YOU TO LIABILITY.
9 ***************************************************************************
10 *
11 * CipherFileTypes.h
12 *
13 * Revision History
14 * ----------------
15 * 8/24/98 ap
16 * Added tags around #endif comment.
17 * 19 Feb 97 Doug Mitchell at NeXT
18 * Created.
19 */
20
21#ifndef _CK_CFILETYPES_H_
22#define _CK_CFILETYPES_H_
23
24#include "ckconfig.h"
25
26#if CRYPTKIT_CIPHERFILE_ENABLE
27
28#include "feeCipherFile.h"
29
30/*
31 * Type of encryption used in a CipherFile.
32 */
33typedef enum {
34
35 /*
36 * DES encryption using pad created via public key exchange; sender's
37 * public key is embedded.
38 */
39 CFE_PublicDES = 1,
40
41 /*
42 * Random DES key used for encryption. The DES key is encrypted via
43 * FEEDExp using recipient's public key; the result is embedded in the
44 * CipherFile. Sender's public key is embedded only if
45 * signature is generated.
46 */
47 CFE_RandDES = 2,
48
49 /*
50 * 1:1 FEED encryption. Sender's public key is embedded.
51 */
52 CFE_FEED = 3,
53
54 /*
55 * 2:1 FEED encryption. Sender's public key is embedded only if signature
56 * is generated.
57 */
58 CFE_FEEDExp = 4,
59
60 /*
61 * User-defined cipherfile.
62 */
63 CFE_Other = 5
64
65} cipherFileEncrType;
66
67
68/*
69 * Signature status upon decryption of a CipherFile.
70 */
71typedef enum {
72
73 SS_NotPresent = 0, // Signature not present.
74 SS_PresentValid = 1, // Signature present and valid.
75 SS_PresentNoKey = 2, // Signature present, but no public key
76 // available to validate it.
77 SS_PresentInvalid = 3 // Signature present and invalid.
78
79} feeSigStatus;
80
81#endif /* CRYPTKIT_CIPHERFILE_ENABLE */
82
83#endif /* _CK_CFILETYPES_H_ */