Changeset 138 for trunk/standards

Show
Ignore:
Timestamp:
02/28/08 14:14:40 (4 years ago)
Author:
ocnils
Message:

Deleted coin locking (#1)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/standards/protocol.txt

    r137 r138  
    2626 
    2727   - do the stuff in ./TODO 
    28    - "Copyright Notice" 
     28   - licence of this document? 
    2929   - "Introduction" 
    3030   - replace "coin" with "token" 
     
    289289  * Wallet Alice and Wallet Bob are synchronized to UTC (within some small margin of error) 
    290290 
    291 * Alice fetches DSDB key at IS 
    292  
    293     DSDB_KEY_REQUEST 
    294     DSDB_KEY_PASS(keycertificate) 
    295  
    296 * Wallet Alice sends obfuscated blanks (coins without signature and with serial 
    297   encrypted for DSDB) with the serial to Wallet Bob (Wallet Alice now needs to wait a while) 
    298  
    299   { 
    300       standard identifier = http://opencoin.org/OpenCoinProtocol/1.0 
    301       currency identifier = http://opencent.net/OpenCent  
    302       denomination        = denomination 
    303       key identifier      = key_id(signing key) 
    304       serial              = base64(encrypt(ALG,pub-key-of-DSDB, serial)) 
    305   } 
    306  
    307      BLANK_PRESENT( dsdb_keycertificate list(blank1, blank2, ...) ) 
    308      XXX remove crypto reference 
    309  
    310 * Wallet Bob check: 
    311  
    312   * Wallet Bob validates the blanks 
    313     - do we have the "currency description document" 
    314     - do we trust the issuer (do we have a valid public key) 
    315     - checks blanks against cdd 
    316  
    317   * If blanks are invalid, the transfer is declined by Wallet Bob 
    318     (later: cdd transfer between wallets) 
    319  
    320   * Wallet Bob shows proposed transfer to Bob 
    321  
    322   * Bob decides whether to  
    323     - accept transfer (trust issuer, enough currency) 
    324     - accept transfer without double spending checking 
    325     - decline transfer 
    326  
    327       BLANK_REJECT( list( (encrypted_serial_blank1, "Reason1"), ... ) ) 
    328       BLANK_REJECT( emptylist, "Reason") 
    329  
    330 if DSDB is required (normal case): 
    331  
    332     * Wallet Bob prepares for coin exchange with IS, by creating blanks of same sum (see #3) 
    333  
    334     * Wallet Bob DSDB lookup 
    335       - parse cdd for issuer service location 
    336       - parse blanks for necessary minting key ids 
    337       - start session with authenticated issuer service (IS) (secured and authenticated by transport layer, e.g. SSL) 
    338         - get all missing minting key certs (MINTING_KEY_FETCH_KEYID) 
    339         - IS sends key certs or rejects a key id (unknown, outdated) (MINTING_KEY_PASS/FAILURE) 
    340         - lock list of encrypted coin serial numbers at IS (DSDB)  
    341             LOCK_COIN_REQUEST( DSDB_key_key_id, transaction_id, 
    342                                list( (key_identifier1, encrypted_serial1), ... ) ) 
    343  
    344         - IS either accepts with locking time or rejects with list of rejected serials + reason (locked, spent)  
    345             If all coins lock: 
    346                LOCK_COIN_ACCEPT(transaction_id, lock_expires) 
    347             If some coins cannot lock, no coins are locked. 
    348                LOCK_COIN_FAILURE(transaction_id, list( (key_identifier1, encrypted_serial1, "Reason1"), ...)) 
    349  
    350                      Reasons: 
    351                            
    352                           Key ID of DSDB is unknown or expired       Permanant 
    353                           Key ID of blank is unknown or expired      Permanant 
    354                           Decryption of serial failed                Permanant 
    355                           Serial already spent                       Permanant 
    356                           Serial locked (not spent)                  Temporary 
    357  
    358  
    359       (this part pauses, session is kept) 
    360  
    361 * Wallet Bob tells Wallet Alice accept or reject with reason (unknown, outdated, locked, spent) for each rejected blank 
    362   (if one blank is rejected the whole transfer has to be rejected) (future: bob signs receipt) 
    363  
    364       BLANK_FAILURE( list( (encrypted_serial_blank1, "Reason1"), ...)) 
    365       BLANK_FAILURE( emptylist, "Reason") 
    366  
    367       BLANK_ACCEPT 
    368  
    369       Note: After BLANK_ACCEPT, a BLANK_REJECT(emptylist, "Reason) can be given to abort the transaction until 
    370             COIN_SPEND is sent 
    371              
    372291* Wallet Alice sends coins to Wallet Bob (this time including their clear serial and signature) 
    373292   
     
    388307     itself etc.) 
    389308 
    390  
    391 if DSDB is required (normal case): 
    392      
    393     * in case of reject in the checking phase delete the blanks, otherwise 
    394         UNLOCK_COIN_REQUEST(transaction_id) 
    395  
    396309    * Wallet Bob sends buy request (blanks + coins) 
    397310 
     
    400313                                list_of_blinds, list_of_coins ) 
    401314 
    402  
    403     (the transaction_id has to be the same as in the lock request, and  
    404      the list of coins has to match the list of locked coins. You can't 
    405      have split / partial redemption) 
    406315 
    407316    * IS has to check if sum of blanks and coins are equal