Changeset 9 for trunk/standards
- Timestamp:
- 12/12/07 16:01:51 (4 years ago)
- Files:
-
- 1 modified
-
trunk/standards/protocol.txt (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/standards/protocol.txt
r8 r9 33 33 34 34 { 35 key identifier = base64(id(p)) 36 denomination = denomination 37 not_before = TIME(...) 38 key_not_after = TIME(...) 39 coin_not_after = TIME(...) 40 public key = base64(p) 41 42 issuer = Hash(pM) 35 key identifier = base64(id(p)) 36 currency identifier = http://opencent.net/OpenCent 37 denomination = denomination 38 not_before = TIME(...) 39 key_not_after = TIME(...) 40 coin_not_after = TIME(...) 41 public key = base64(p) 42 43 issuer = Hash(pM) 43 44 base64(sig(sM, hash(content part))) 44 45 } … … 79 80 * Wallet: fetches current public minting keys for denomination 80 81 81 Wallet: FETCH_MINTING_KEY #string(denomination) 82 Wallet: FETCH_MINTING_KEY {DENOMINATION #string(denomination)|KEYID #hexstring(key_id)} 82 83 IS: PASS_MINTING_KEY keycertificate 84 or FAIL_MINTING_KEY "Reason" 83 85 84 86 (question: base64 response?) … … 179 181 * Wallet Alice calculates a splitting of sum into coins (units) and 180 182 creates a list of coins to send 183 * Wallet Alice and Wallet Bob are synchronized to UTC (within some small margin of error) 181 184 182 185 * Alice fetches DSDB key at IS … … 233 236 - parse blanks for necessary minting key ids 234 237 - start session with authenticated issuer service (IS) (secured and authenticated by transport layer, e.g. SSL) 235 - get session id (from transport layer) 236 - get all missing minting key certs 237 - IS sends key certs or rejects a key id (unknown, outdated) 238 - create transaction id (two-party secret agreement (collision free)) 239 Possible example with https. 240 USE_HTTPS_SESSIONID 241 YES|NO 242 - get all missing minting key certs (FETCH_MINTING_KEY) 243 - IS sends key certs or rejects a key id (unknown, outdated) (PASS_MINTING_KEY/FAIL_MINTING_KEY) 238 244 - lock list of encrypted coin serial numbers at IS (DSDB) 245 LOCK_COINS #key_id_of_DSDB #hex_string(transaction_id) #hex_string(#number_of_obfuscated_blanks) 246 #key_identifier1 #encrypted_serial1 247 #key_identifier2 #encrypted_serial2[\r]\n 248 239 249 - IS either accepts with locking time or rejects with list of rejected serials + reason (locked, spent) 250 If all coins lock: 251 LOCK_COINS_GRANTED #hex_string(transaction_id) TIME(lock_expires) 252 If some coins cannot lock, no coins are locked. 253 LOCK_COINS_FAILED #hex_sting(transaction_id) #hex_string(number_of_failures) 254 #key_identifier1 #encrypted_serial1 "Reason 1" 255 #key_identifier2 #encrypted_serial2 "Reason 2"[\r]\n 256 257 Reasons: 258 259 Key ID of DSDB is unknown or expired Permanant 260 Key ID of blank is unknown or expired Permanant 261 Decryption of serial failed Permanant 262 Serial already spent Permanant 263 Serial locked (not spent) Temporary 264 240 265 241 266 (this part pauses, session is kept) … … 244 269 (if one blank is rejected the whole transfer has to be rejected) (future: bob signs receipt) 245 270 271 REFUSE_BLANK #hex_string(number_of_failures) 272 #base64(ecrypted serial of blank1) "Why did we fail?!?" 273 #base64(ecrypted serial of blank2) "Why did we fail?!?"[\r]\n 274 275 REFUSE_BLANK #hex_string(0) "reason" 276 277 ACCEPT_BLANK 278 279 Note: After ACCEPT_BLANK, a REFUSE_BLANK #hex_string(0) can be given to abort the transaction 280 281 246 282 * Wallet Alice sends coins to Wallet Bob (this time including their clear serial and signature) 247 283 248 SPEND_COINS 284 SPEND_COINS #hex_string(number_of_coins) 285 #base64(coin1) 286 #base64(coin2)[\r]\n 249 287 250 288 * Wallet Bob checks that the coins match the blanks and that signatures are valid 251 289 252 290 * Wallet Bob accepts transaction or rejects with reason (unknown, invalid) for each rejected coin 291 292 REJECT_COIN #hex_string(number_of_coins) 293 #base64(coin1) "Reason" 294 #base64(coin2) "Reason"[\r]\n 295 296 REJECT_COIN #hex_string(0) "Reason" 297 298 ACCEPT_COIN 253 299 254 300 * Wallet Bob terminates session with Wallet Alice … … 261 307 262 308 * in case of reject in the checking phase delete the blanks, otherwise 263 309 UNLOCK_COINS #hex_string(transaction_id) 310 264 311 * Wallet Bob sends buy request (blanks + coins) (Wallet Bob continues as in #4 and #8) 312 (REDEEM_COINS+REQUEST_MINT) 265 313 266 314 * IS has to check if sum of blanks and coins are equal … … 269 317 #7 Redeeming Coins 270 318 271 * Wallet locks serials at IS (see above )319 * Wallet locks serials at IS (see above LOCK_COINS) 272 320 273 321 * Wallet sends coins + target to IS 274 322 275 323 - target can be an account 324 REDEEM_COINS #hex_string(transaction_id) "#string(target)" #hex_string(number_of_coins) 325 #base64(coin1) 326 #base64(coin2)[\r]\n 327 328 target is of the form: 329 MINT_REQUEST=#base64(request_id) 330 ONLINE_BANKING_ACCOUNT=#string(account_identifier) 331 and so on... to be defined with relationship between IS and individual 276 332 277 333 * continue with #8 334 335 * Send money to target 278 336 279 337 … … 284 342 - if serial is still valid (against DSDB) 285 343 - if signature is valid 344 - if target is valid 286 345 287 346 * IS rejects with reason (key id unknown, coin outdated, coin spent, signature invalid) per coin or 347 REJECT_COINS #hex_string(number_of_coins) 348 #base64(coin1) "Reason" 349 #base64(coin2) "Reason"[\r]\n 288 350 289 351 * (IS tries to service target, rejects with reason if not possible) … … 292 354 293 355 * IS sends accept to Wallet 294 295 356 ACCEPT_COINS 357
