| 1 | *********************** |
|---|
| 2 | * Protocol Containers * |
|---|
| 3 | *********************** |
|---|
| 4 | |
|---|
| 5 | This document gives the containers for all complex data formats used in |
|---|
| 6 | opencoin, including certificates, coins, blanks, and obfuscate blanks. |
|---|
| 7 | |
|---|
| 8 | The format is |
|---|
| 9 | Name1 = { |
|---|
| 10 | ContentName1 = Value1 |
|---|
| 11 | ContentName2 = Value2 |
|---|
| 12 | ContentName3 = Value3 |
|---|
| 13 | |
|---|
| 14 | ExtraName1 = Value4 |
|---|
| 15 | ExtraName2 = Value5 |
|---|
| 16 | } |
|---|
| 17 | |
|---|
| 18 | ContentNames and ExtraNames are always seperated by a blank line. |
|---|
| 19 | ContentNames are required to be in all formats. ExtraNames are optional. |
|---|
| 20 | |
|---|
| 21 | When refering to a part of a structure, Name1.ContentName1 refers to the |
|---|
| 22 | value of ContentName1 in Name1. Similarily, ContentName2 refers to the |
|---|
| 23 | value of ContentName2 in the same structure. |
|---|
| 24 | |
|---|
| 25 | A special identifier, ContentPart is the combination of all ContentNames. |
|---|
| 26 | |
|---|
| 27 | The identifier names in ContentNames and ExtraNames cannot be the same as |
|---|
| 28 | any other identifier. |
|---|
| 29 | |
|---|
| 30 | --------------------------------------------------- |
|---|
| 31 | |
|---|
| 32 | ================ |
|---|
| 33 | = Certificates = |
|---|
| 34 | ================ |
|---|
| 35 | |
|---|
| 36 | Currency Description Document (CCD) = |
|---|
| 37 | { |
|---|
| 38 | standard identifier = http://opencoin.org/OpenCoinProtocol/1.0 |
|---|
| 39 | currency identifier = http://opencent.net/OpenCent |
|---|
| 40 | short currency identifier = OC |
|---|
| 41 | issuer service location = opencoin://issuer.opencent.net:8002 |
|---|
| 42 | denominations = ['1', '2', '5', ...] #list of strings |
|---|
| 43 | issuer cipher suite = HASH-ALG, SIGN-ALG, BLINDING-ALG |
|---|
| 44 | options = list(options) | list() |
|---|
| 45 | issuer public master key = base64(pM) |
|---|
| 46 | |
|---|
| 47 | issuer = hash(pM) |
|---|
| 48 | signature = base64(sig(sM,hash(content part))) |
|---|
| 49 | } |
|---|
| 50 | |
|---|
| 51 | |
|---|
| 52 | Mint Key = |
|---|
| 53 | { |
|---|
| 54 | key identifier = base64(hash(pP)) |
|---|
| 55 | currency identifier = http://opencent.net/OpenCent |
|---|
| 56 | denomination = denomination |
|---|
| 57 | not_before = TIME(...) |
|---|
| 58 | key_not_after = TIME(...) |
|---|
| 59 | token_not_after = TIME(...) |
|---|
| 60 | public key = base64(pP) |
|---|
| 61 | |
|---|
| 62 | issuer = hash(pM) |
|---|
| 63 | signature = base64(sig(sM, hash(content part))) |
|---|
| 64 | } |
|---|
| 65 | |
|---|
| 66 | |
|---|
| 67 | --------------------------------------------------- |
|---|
| 68 | |
|---|
| 69 | ================== |
|---|
| 70 | = Coins & Blanks = |
|---|
| 71 | ================== |
|---|
| 72 | |
|---|
| 73 | Blank = |
|---|
| 74 | { |
|---|
| 75 | standard identifier = http://opencoin.org/OpenCoinProtocol/1.0 |
|---|
| 76 | currency identifier = http://opencent.net/OpenCent |
|---|
| 77 | denomination = denomination |
|---|
| 78 | key identifier = base64(hash((pP)) |
|---|
| 79 | serial = base64(128bit random number) |
|---|
| 80 | } |
|---|
| 81 | |
|---|
| 82 | |
|---|
| 83 | Coin = |
|---|
| 84 | { |
|---|
| 85 | standard identifier = http://opencoin.org/OpenCoinProtocol/1.0 |
|---|
| 86 | currency identifier = http://opencent.net/OpenCent |
|---|
| 87 | denomination = denomination |
|---|
| 88 | key identifier = base64(hash(pP)) |
|---|
| 89 | serial = base64(128bit random number) |
|---|
| 90 | |
|---|
| 91 | signature = base64(sig(pP, content part)) |
|---|
| 92 | } |
|---|