Changeset 2 for trunk/standards/protocol

Show
Ignore:
Timestamp:
12/07/07 17:47:38 (4 years ago)
Author:
ocjhb
Message:

first draft

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/standards/protocol

    r1 r2  
    11OpenCoin  
     2 
     3How the wallet creates a coin and communicates with an issuer 
     4============================================================= 
    25 
    36#1 issuer setup 
     
    3639 
    3740 
    38 #3 wallet sends signing reuest to issuer 
     41#3 wallet creates blanks 
    3942 
    4043* Wallet: fetches current public minting keys for denomination 
     
    5558    blind = blinding(r, blank) 
    5659  
    57   Keep (r, blank, blind) in mind. Send  
     60  Keep (r, blank, blind) in mind.  
     61   
     62   
     63#4 wallet send minting request to issuer   
     64 
     65* Send  
    5866 
    5967    request = ( (blind, key_id), [request_id] ) 
     
    6371* Issuer: checks, if key_id is current, otherwise rejct with "current key is #ID" 
    6472 
    65   Decides if request will be minted (e.g., payment not yet received), otherwise reject 
     73  Decides if request will be minted (e.g., payment not yet received), otherwise rejects 
    6674 
    6775  Issuer passes (maybe asynchronous) reuest to mint. 
     
    7280 
    7381 
    74 #4 Wallet gets coin back 
     82#5 Wallet gets coin back 
    7583 
    7684* Wallet asks issuer service "fetch_signed_blind request_id" 
     
    8492* Wallet unblinds signed blind and yields coin  (or reblinds) 
    8593 
     94 
     95#6 Wallet to Wallet 
     96 
     97Wallet S - sends a coin 
     98Wallet R - receives the coin 
     99 
     100* (Wallet S locates Wallet R) 
     101  (S knows how much to send) 
     102 
     103* S tells Wallet S what sum to send to Wallet R 
     104 
     105* Wallet S needs to compute a splitting of sum into coins (units) 
     106 
     107* Wallet S sends blanks of coins (without signature!) to Wallet R  
     108  (Wallet S now needs to wait a while) 
     109 
     110* Wallet R validates the blanks 
     111  - do we have the "currency description document" 
     112  - do we trust the issuer (do we have a valid public key) 
     113  - checks blanks against cdd 
     114 
     115* If blanks are invalid, the transfer is declined by Wallet R 
     116  (later: cdd transfer between wallets) 
     117 
     118* Wallet R shows proposed transfer to user R 
     119 
     120* user R decides whether to  
     121  - accept transfer 
     122  - accept transfer without double spending checking 
     123  - decline transfer 
     124 
     125 
     126if dsdb is reuired (normal case): 
     127 
     128    * Wallet R prepares for coin exchange with IS, by creating blanks of same sum (see #3) 
     129 
     130    * Wallet R DSDB lookup 
     131      - parse cdd for issuer service location 
     132      - parse blanks for  necessary minting key ids 
     133      - start session with authenticated issuer service (IS) (secured and authenticated by transport layer, e.g. SSL) 
     134        - get session id (from transport layer) 
     135        - get all missing minting key certs 
     136        - IS sends key certs or rejects a key id (unknown, outdated) 
     137        - lock list of coin serial numbers at IS (DSDB)  
     138        - IS either accepts with locking time or rejects with list of rejected serials + reason (locked, spent)  
     139 
     140      (this part pauses, session is kept) 
     141 
     142* Wallet R tells Wallet S accept or reject with reason (unknown, outdated, locked, spent) for each rejected blank 
     143  (if one blank is rejected the whole transfer has to be rejected) 
     144 
     145* Wallet S sends coins to Wallet R (= blanks + signature) 
     146   
     147* Wallet R checks that the coins match the blanks and that signatures are valid 
     148 
     149* Wallet R accepts transaction or rejects with reason (unknown, invalid) for each rejected coin 
     150 
     151* Wallet R terminates session with Wallet S 
     152 
     153    (in case of rejection Wallet S needs to do emergency meassures, quickly trying to exchange coins with IS  
     154     itself etc.) 
     155 
     156 
     157if dsdb is reuired (normal case): 
     158     
     159    * in case of reject in the checking phase delete the blanks, otherwise 
     160     
     161    * Wallet R sends buy request (blanks + coins) (Wallet R continues as in #4 and #8) 
     162 
     163    * IS has to check if sum of blanks and coins are equal 
     164 
     165 
     166#7 Redeeming Coins  
     167 
     168* Wallet locks serials at IS (see above) 
     169 
     170* Wallet sends coins + target to IS 
     171   
     172  - target can be an account 
     173 
     174* continue with #8 
     175 
     176 
     177#8 Accepting coins 
     178 
     179* IS checks: 
     180    - if minting keys are still valid 
     181    - if serial is still valid (against DSDB) 
     182    - if signature is valid 
     183 
     184* IS rejects with reason (key id unknown, coin outdated, coin spent, signature invalid) per coin or  
     185 
     186* (IS tries to service target, rejects with reason if not possible) 
     187 
     188* IS enters serials into DSDB 
     189 
     190* IS sends accept to Wallet 
     191 
     192