Changeset 142 for trunk/standards
- Timestamp:
- 02/28/08 20:57:50 (4 years ago)
- Files:
-
- 1 modified
-
trunk/standards/protocol.txt (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/standards/protocol.txt
r141 r142 28 28 - licence of this document? 29 29 - "Introduction" 30 - replace " coin" with "token"30 - replace "COIN_SPEND" with "TRANSFER_TOKEN" 31 31 - decide whether the protocol atoms are tokens or lists of tokens 32 32 - throw out reduntant "TRANSFER_TOKEN" explanatoins … … 43 43 3.3.5."TRANSFER_TOKEN": A generic wallet-issuer request 44 44 3.4. Wallet send minting request to issuer 45 3.5. Wallet gets coin back46 3.6. Wallet to Wallet47 3.7. Redeeming Coins45 3.5. Wallet gets token back 46 3.6. Wallet to wallet 47 3.7. Redeeming tokens 48 48 4. References 49 49 … … 95 95 not_before = TIME(...) 96 96 key_not_after = TIME(...) 97 coin_not_after = TIME(...)97 token_not_after = TIME(...) 98 98 public key = base64(pP) 99 99 … … 162 162 3.3.5 "TRANSFER_TOKEN": A generic wallet-issuer request 163 163 164 The atom for this transaction is a list of coins - if one of the coins /blanks164 The atom for this transaction is a list of tokens - if one of the tokens /blanks 165 165 fail, the whole transaction fails. 166 166 … … 171 171 172 172 TRANSFER_TOKEN_REQUEST( transaction_id, list_of_options, target, \ 173 list_of_blinds, list_of_ coins )173 list_of_blinds, list_of_tokens ) 174 174 175 175 XXX list of blinds -> list of (blinds + denomination key/id) … … 182 182 * option may contain variable=value pairs like "JITM=mandatory". 183 183 * target 184 * value(list_of_blinds) = value(list_of_ coins): empty185 * value(list_of_blinds) > value(list_of_ coins): payment reference186 * value(list_of_blinds) < value(list_of_ coins): account reference184 * value(list_of_blinds) = value(list_of_tokens): empty 185 * value(list_of_blinds) > value(list_of_tokens): payment reference 186 * value(list_of_blinds) < value(list_of_tokens): account reference 187 187 188 188 For now, only 'pure' transactions are allowed, so one of these must 189 189 be empty: 190 * target : coin exchange (value(list_of_blinds) = value(list_of_coins))191 * list_of_ coins : mint request190 * target : token exchange (value(list_of_blinds) = value(list_of_tokens)) 191 * list_of_tokens : mint request 192 192 * list_of_blinds: redemption 193 193 194 If at least one of the blinds or coins is rejected, the issuer answers194 If at least one of the blinds or tokens is rejected, the issuer answers 195 195 196 196 TRANSFER_TOKEN_REJECT( transaction_id, reason, 197 197 list( (blind1.key_id, reason1), ... ), \ 198 list( ( coin1.key_id, reason1), ... ) )198 list( (token1.key_id, reason1), ... ) ) 199 199 200 200 where "reason" may be some general failure like "500 minting not available". … … 241 241 242 242 In case of delayed minting, mint processes request (signs blind with key_id) 243 some time later and passes "signed blind"="blind coin" back to IS244 245 246 3.5 Wallet gets coin back243 some time later and passes "signed blind"="blind token" back to IS 244 245 246 3.5 Wallet gets token back 247 247 248 248 * Wallet asks issuer service [was: FETCH_MINTED_REQUEST] … … 273 273 (optional: if yes, inform issuer that he may delete the request) 274 274 275 * Wallet unblinds signed blind and yields coin (or reblinds)276 277 278 3.6 Wallet to Wallet279 280 Alice - sends a coin281 Bob - receives the coin275 * Wallet unblinds signed blind and yields token (or reblinds) 276 277 278 3.6 Wallet to wallet 279 280 Alice - sends a token 281 Bob - receives the token 282 282 283 283 Note: … … 288 288 * Wallet Alice locates Wallet Bob and sets up (secure) connection 289 289 * Alice knows how much to send and tells her Wallet 290 * Wallet Alice calculates a splitting of sum into coins (units)291 and reates a list of coins to send290 * Wallet Alice calculates a splitting of sum into tokens (units) 291 and reates a list of tokens to send 292 292 * Wallet Alice and Wallet Bob are synchronized to UTC (within some small 293 293 margin of error) … … 305 305 306 306 307 * Wallet Alice sends coins to Wallet Bob (this time including their clear307 * Wallet Alice sends tokens to Wallet Bob (this time including their clear 308 308 serial and signature) 309 309 310 A: COIN_SPEND( transaction_id, list( coin1, ...) )310 A: COIN_SPEND( transaction_id, list(token1, ...) ) 311 311 312 312 … … 318 318 them: 319 319 320 B: COIN_REJECT( transaction_id, list( ( coinN, "ReasonN") ) )320 B: COIN_REJECT( transaction_id, list( (tokenN, "ReasonN") ) ) 321 321 or COIN_REJECT( transaction_id, emptylist, "Reason") 322 322 or COIN_ACCEPT( transaction_id ) … … 331 331 332 332 333 3.7 Redeeming Coins334 335 * Wallet sends coins + target to IS333 3.7 Redeeming tokens 334 335 * Wallet sends tokens + target to IS 336 336 337 337 W: TRANSFER_TOKEN_REQUEST( 338 transaction_id, list_of_options, target, (empty list), list_of_ coins338 transaction_id, list_of_options, target, (empty list), list_of_tokens 339 339 ) 340 340 … … 347 347 348 348 * IS checks if tokens and target are valid 349 - if minting keys are still valid (XXX coin has not expired)349 - if minting keys are still valid (XXX token has not expired) 350 350 - if serial is still valid (against DSDB) 351 351 - if signature is valid 352 352 353 If not, IS rejects with reason (key id unknown, coin outdated, coin spent,354 signature invalid) per coin or sweeping353 If not, IS rejects with reason (key id unknown, token outdated, token spent, 354 signature invalid) per token or sweeping 355 355 356 356 IS: TRANSFER_TOKEN_REJECT( 357 transaction_id, reason, (empty list), list( ( coin1.key_id, reason1), ... ) )357 transaction_id, reason, (empty list), list( (token1.key_id, reason1), ... ) ) 358 358 ) 359 359
