Changeset 13 for trunk/standards/protocol.txt
- Timestamp:
- 12/12/07 22:39:49 (4 years ago)
- Files:
-
- 1 modified
-
trunk/standards/protocol.txt (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/standards/protocol.txt
r9 r13 47 47 48 48 Questions: 49 * Time format: YYYYMMDDHHMMSS 20071211144111 or SecondsSinceEpoch ?49 * Time format: YYYYMMDDHHMMSS 20071211144111 or SecondsSinceEpoch or ISO 8601? 50 50 * id() = sha256()? 51 51 * CDD? … … 80 80 * Wallet: fetches current public minting keys for denomination 81 81 82 Wallet: FETCH_MINTING_KEY {DENOMINATION #string(denomination)|KEYID #hexstring(key_id)} 83 IS: PASS_MINTING_KEY keycertificate 84 or FAIL_MINTING_KEY "Reason" 85 86 (question: base64 response?) 82 Wallet: 83 MINTING_KEY_FETCH_DENOMINATION(denomination) or MINTING_KEY_FETCH_KEYID(key_id) 84 IS: 85 MINTING_KEY_PASS(keycertificate) or MINTING_KEY_FAILURE(reason) 87 86 88 87 * Wallet: creates blank according to CDD: … … 110 109 * Send 111 110 112 REQUEST_MINTING #base64(request_id) #hex_string(number_of_blinds) 113 #key_id(blind1) #base64(blind1) 114 #key_id(blind2) #base64(blind2)[\r]\n 111 MINT_REQUEST(request_id, list( (blind1.key_id, blind1), ... ) ) 115 112 116 113 to issuer service … … 118 115 * Issuer: if key_id is not current: 119 116 120 REFUSE_MINTING #hex_string(number_of_rejected_blinds) 121 #key_id(blind1) "Bad Key ID" 122 #key_id(blind2) "Bad Key ID"[\r]\n 117 MINT_REJECT( list( (blind1.key_id, "Bad Key ID"), ... ) ) 123 118 124 119 Elif request will not be minted (e.g., payment not yet received): 125 120 126 REFUSE_MINTING #hex_string(number_of_rejected_blinds) 127 #key_id(blind1) "Some error message" 128 #key_id(blind2) "Some error message"[\r]\n 121 MINT_REJECT( list( (blind1.key_id, "Reason1"), ... ) ) 129 122 130 123 Else: IS passes (maybe asynchronous) request to mint and: 131 ACKNOWLEDGE_MINTING #base64(request_id)[\r]\n124 MINT_ACCEPT(request_id) 132 125 133 126 Session is terminated. … … 144 137 * Wallet asks issuer service "fetch_signed_blind request_id" 145 138 146 FETCH_MINTED_ BLINDS #base64(request_id)139 FETCH_MINTED_REQUEST(request_id) 147 140 148 141 * IS either rejects finally or temporarily 149 142 150 FETCH_MINTED_FAIL ED #base64(request_id) "Reason"151 FETCH_MINTED_WAIT #base64(request_id) "Reason"143 FETCH_MINTED_FAILURE(request_id, "Reason") 144 FETCH_MINTED_WAIT(request_id, "Reason") 152 145 153 146 Possible failures: "Request ID Unknown", "Request ID expired", "Request ID rejected" … … 158 151 or passes signed blinds to wallet Bob, must preserve order 159 152 160 PASS_MINTED_BLINDS #base64(request_id) #hex_string(number_of_blinds) 161 #base64(signature_of_blind1) 162 #base64(signature_of_blind2)[\r]\n 163 153 FETCH_MINTED_ACCEPT(request_id, list(signature_of_blind1, ...) ) 154 164 155 Session terminates 165 156 … … 185 176 * Alice fetches DSDB key at IS 186 177 187 FETCH_DSDB_KEY188 PASS_DSDB_KEY keycertificate178 DSDB_KEY_REQUEST 179 DSDB_KEY_PASS(keycertificate) 189 180 190 181 * Wallet Alice sends obfuscated blanks (coins without signature and with serial … … 199 190 } 200 191 201 PRESENT_BLANK #hex_string(number_of_blanks) 202 blank1[\r]\n 203 blank2[\r]\n 192 BLANK_PRESENT( list(blank1, blank2, ...) ) 204 193 205 194 * Wallet Bob check: … … 220 209 - decline transfer 221 210 222 REFUSE_BLANK #hex_string(number_of_failures) 223 #base64(ecrypted serial of blank1) "Why did we fail?!?" 224 #base64(ecrypted serial of blank2) "Why did we fail?!?"[\r]\n 225 226 REFUSE_BLANK #hex_string(0) "reason" 211 BLANK_REJECT( list( (encrypted_serial_blank1, "Reason1"), ... ) ) 212 BLANK_REJECT( emptylist, "Reason") 227 213 228 214 (Todo: Add reasons) … … 240 226 USE_HTTPS_SESSIONID 241 227 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)228 - get all missing minting key certs (MINTING_KEY_FETCH_KEYID) 229 - IS sends key certs or rejects a key id (unknown, outdated) (MINTING_KEY_PASS/FAIL_MINTING_KEY_FAILURE) 244 230 - 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 231 LOCK_COINS_REQUEST( DSDB_key_key_id, transaction_id, 232 list( (key_identifier1, encrypted_serial1), ... ) ) 248 233 249 234 - IS either accepts with locking time or rejects with list of rejected serials + reason (locked, spent) 250 235 If all coins lock: 251 LOCK_COINS_ GRANTED #hex_string(transaction_id) TIME(lock_expires)236 LOCK_COINS_ACCEPT(transaction_id, lock_expires) 252 237 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 238 LOCK_COINS_FAILURE(transaction_id, list( (key_identifier1, encrypted_serial1, "Reason1"), ...)) 256 239 257 240 Reasons: … … 269 252 (if one blank is rejected the whole transfer has to be rejected) (future: bob signs receipt) 270 253 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 254 BLANK_FAILURE( list( (encrypted_serial_blank1, "Reason1"), ...)) 255 BLANK_FAILURE( emptylist, "Reason") 256 257 BLANK_ACCEPT 258 259 Note: After BLANK_ACCEPT, a BLANK_REJECT(emptylist, "Reason) can be given to abort the transaction until 260 COINS_SPEND is sent 261 282 262 * Wallet Alice sends coins to Wallet Bob (this time including their clear serial and signature) 283 263 284 SPEND_COINS #hex_string(number_of_coins) 285 #base64(coin1) 286 #base64(coin2)[\r]\n 264 COINS_SPEND( list(coin1, ...) ) 287 265 288 266 * Wallet Bob checks that the coins match the blanks and that signatures are valid … … 290 268 * Wallet Bob accepts transaction or rejects with reason (unknown, invalid) for each rejected coin 291 269 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" 270 COINS_REJECT( list( (coin1, "Reason1") ) ) 271 COINS_REJECT( emptylist, "Reason") 297 272 298 273 ACCEPT_COIN … … 307 282 308 283 * in case of reject in the checking phase delete the blanks, otherwise 309 UNLOCK_COINS #hex_string(transaction_id)284 UNLOCK_COINS_REQUEST(transaction_id) 310 285 311 286 * Wallet Bob sends buy request (blanks + coins) (Wallet Bob continues as in #4 and #8) 312 ( REDEEM_COINS+REQUEST_MINT)287 (COINS_REDEEM+MINT_REQUEST) 313 288 314 289 * IS has to check if sum of blanks and coins are equal … … 322 297 323 298 - 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 299 COINS_REDEEM(transaction_id, target, list(coin1, ...) 327 300 328 301 target is of the form: … … 345 318 346 319 * 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 320 COINS_REJECT( list(coin1, ...) ) 350 321 351 322 * (IS tries to service target, rejects with reason if not possible) … … 354 325 355 326 * IS sends accept to Wallet 356 ACCEPT_COINS357 327 COINS_ACCEPT 328
