Skip to content

Emit vectors from the tsp flow #304

Draft
tediou5 wants to merge 12 commits intomainfrom
test-vector-cli
Draft

Emit vectors from the tsp flow #304
tediou5 wants to merge 12 commits intomainfrom
test-vector-cli

Conversation

@tediou5
Copy link
Copy Markdown
Contributor

@tediou5 tediou5 commented Apr 7, 2026

This PR is built on top of the actual protocol implementation from accepting parallel relationships pr.

The goal is to produce enough vectors with as little change as possible.

To make it easier to use, I extracted the profiles that were previously embedded in the bench code into a shared module and reused them. That means you now only need to start a receiver first, then run the sender with --features emit-vectors, and all vectors will be printed on the sender side.

receiver, use local-tcp profile

cargo run -p examples --features emit-vectors --bin tsp -- --wallet tv_receiver receive bob --profile local-tcp
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.45s
     Running `target/debug/tsp --wallet tv_receiver receive bob --profile local-tcp`
 INFO tsp: created new wallet
 INFO tsp: listening for messages...
TV: received.sender.did = did:web:raw.githubusercontent.com:openwallet-foundation-labs:tsp:main:examples:test:alice
TV: received.receiver.did = did:web:raw.githubusercontent.com:openwallet-foundation-labs:tsp:main:examples:test:bob
TV: received.crypto.type = nacl-essr
TV: received.sender.signature_key_type = Ed25519
TV: received.sender.encryption_key_type = X25519
TV: received.receiver.signature_key_type = Ed25519
TV: received.receiver.encryption_key_type = X25519
TV: received.sender.sign.public = 7dUAj8TdKRfQwSkUqa3dyCMr8AhggYRAv2RuMZ514sE
TV: received.sender.enc.public = y-FbCCEodGckHNDqCVOcIyf9uESpaepAVRewGxmt_QU
TV: received.receiver.sign.public = NBcP690uVtoJChxvBCxZyy2inI-R24G3aNBWOKwU5lI
TV: received.receiver.enc.public = QFn5SXupDgBTtzkGc2W3MvoSCHjd8uUD0dapfEXqET4
TV: received.receiver.sign.private = 1i95TnosmKFwmW_pu300ulOaT9m1OV4xIhnFue8Ltek
TV: received.receiver.enc.private = Kk-O0T0IoxGgtxyd7JYCv6moGIi83wPRINDsWKgGNVs
TV: received.rfi.thread_id = _H4eU_8ffhJtfP6164IHTZg0UA_fq-0tlOc13rHApXA
 INFO tsp: received relationship request from did:web:raw.githubusercontent.com:openwallet-foundation-labs:tsp:main:examples:test:alice, thread-id '/H4eU/8ffhJtfP6164IHTZg0UA/fq+0tlOc13rHApXA'
did:web:raw.githubusercontent.com:openwallet-foundation-labs:tsp:main:examples:test:alice	/8ffhJtfP6164IHTZg0UA/fq+0tlOc13rHApXA
TV: received.message.plaintext = Hello world!
TV: received.message.nonconfidential_data = Hello data message.
 INFO tsp: received confidential message (12 bytes) from did:web:raw.githubusercontent.com:openwallet-foundation-labs:tsp:main:examples:test:alice (NaCl ESSR, Ed25519 signature)
Hello world!

sender, use local-tcp profile

printf 'Hello world!' | cargo run -p examples --features test-vectors --bin tsp -- --wallet tv_sender send -s alice -r bob --profile local-tcp -n 'Hello data message.'
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.34s
     Running `target/debug/tsp --wallet tv_sender send -s alice -r bob --profile local-tcp -n 'Hello data message.'`
 INFO tsp: created new wallet
TV: sender.did = did:web:raw.githubusercontent.com:openwallet-foundation-labs:tsp:main:examples:test:alice
TV: receiver.did = did:web:raw.githubusercontent.com:openwallet-foundation-labs:tsp:main:examples:test:bob
TV: crypto.type = nacl-essr
TV: sender.signature_key_type = Ed25519
TV: sender.encryption_key_type = X25519
TV: receiver.signature_key_type = Ed25519
TV: receiver.encryption_key_type = X25519
TV: sender.sign.public = 7dUAj8TdKRfQwSkUqa3dyCMr8AhggYRAv2RuMZ514sE
TV: sender.sign.private = 3J-rg_PjScxUcft6Vsp3pqN6RnlSbVRS32i2cok8JnA
TV: sender.enc.public = y-FbCCEodGckHNDqCVOcIyf9uESpaepAVRewGxmt_QU
TV: sender.enc.private = leLd8w1nbPoKkSVbq_uzFo-wzxORu9oocrAh7X6ii6s
TV: receiver.sign.public = NBcP690uVtoJChxvBCxZyy2inI-R24G3aNBWOKwU5lI
TV: receiver.sign.private = 1i95TnosmKFwmW_pu300ulOaT9m1OV4xIhnFue8Ltek
TV: receiver.enc.public = QFn5SXupDgBTtzkGc2W3MvoSCHjd8uUD0dapfEXqET4
TV: receiver.enc.private = Kk-O0T0IoxGgtxyd7JYCv6moGIi83wPRINDsWKgGNVs
TV: rfi.request_nonce = x3DhHzaV_GdRnTXBMzrfxw0AE-iJ0j4rBkLitgHD3Oc
TV: rfi.seal_nonce = 3ukDYCjpVDxb_nL-tvRh2e9hmjHVMHJJ
TV: rfi.message = -EBAYTSP-AAB5BAeAGRpZDp3ZWI6cmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbTpvcGVud2FsbGV0LWZvdW5kYXRpb24tbGFiczp0c3A6bWFpbjpleGFtcGxlczp0ZXN0OmFsaWNl4BAdZGlkOndlYjpyYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tOm9wZW53YWxsZXQtZm91bmRhdGlvbi1sYWJzOnRzcDptYWluOmV4YW1wbGVzOnRlc3Q6Ym9iXAAA6CBGAABg85bSJS_nNtl4oAlxncvsc2gr_LfcWAP3HAKOgEhKypKYom3-5t51rh7eNM3Zj8jqWxT1gnudg3uq64sW3oYBrRxiCZCDmE7HfZFxlh7RR7K68IrHBhdgzv-pvnDY33iUioy7VWUANh7WtdBXYH_jCNEcqxLj5_TOpJDLPeIS2uiylq6nY4NjZzoty8RrBnfeMq2Dj8PwPpkfe8hTCAdf2rSM1UfvDV5jeQ3wWzv9zCxrOH_27iKO3ukDYCjpVDxb_nL-tvRh2e9hmjHVMHJJ-CAW-KAW0BDM4hkJj9pMp0hzQ-3cbaGAXvA-LBe-2YBWKAcJX6eV7Ht1ngDwL68b5X1UFGHRnnTDRihayZWQa9uoSf1Ft0QD
TV: rfi.thread_id = qSu61mEoDDCfwv5QJ0Usvc_A64nW8tl8851geXWfJdI
 INFO tsp_sdk::async_store: sending message to tcp://127.0.0.1:13372
TV: message.seal_nonce = PlpzSAHbygaS-kEvyJ5ibv8oPB1I9XkF
TV: message.plaintext = Hello world!
TV: message.nonconfidential_data = Hello data message.
TV: message.sealed = -EBIYTSP-AAB5BAeAGRpZDp3ZWI6cmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbTpvcGVud2FsbGV0LWZvdW5kYXRpb24tbGFiczp0c3A6bWFpbjpleGFtcGxlczp0ZXN0OmFsaWNl4BAdZGlkOndlYjpyYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tOm9wZW53YWxsZXQtZm91bmRhdGlvbi1sYWJzOnRzcDptYWluOmV4YW1wbGVzOnRlc3Q6Ym9iXAAA6BAHAABIZWxsbyBkYXRhIG1lc3NhZ2Uu6CA0AABeeV0a8z0hW5d6KkDINKJ6Uum2sbmUQHVT1WYoLxqsFyi4pm98_MpUWoZu5AgiwmH_FLbb7jvUgiCfgsdTnhsNual2I2X3rhos6TIilYFzj6U9Zuzz640LNJAW2CFoDBmRHAcWMFrnSXccHIHVBB3Ubacw1NYV-PP88D1kHX6uLfCfPlpzSAHbygaS-kEvyJ5ibv8oPB1I9XkF-CAW-KAW0BAMSlf6UGkJEVVoieFgcydTvh-AcoOxkiml9TZyPV0TlAAiN62nrl9ZGPwkRzgdefITe83ce-RTU4aNfv7ueAII
 INFO tsp_sdk::async_store: sending message to tcp://127.0.0.1:13372
 INFO tsp: sent message (12 bytes) from alice to did:web:raw.githubusercontent.com:openwallet-foundation-labs:tsp:main:examples:test:bob

tediou5 added 11 commits March 30, 2026 02:16
Signed-off-by: qians <qiangezaici@outlook.com>
Signed-off-by: qians <qiangezaici@outlook.com>
Signed-off-by: qians <qiangezaici@outlook.com>
Signed-off-by: qians <qiangezaici@outlook.com>
Signed-off-by: qians <qiangezaici@outlook.com>
Signed-off-by: qians <qiangezaici@outlook.com>
Signed-off-by: qians <qiangezaici@outlook.com>
Signed-off-by: qians <qiangezaici@outlook.com>
Signed-off-by: qians <qiangezaici@outlook.com>
Signed-off-by: qians <qiangezaici@outlook.com>
Signed-off-by: qians <qiangezaici@outlook.com>
@tediou5 tediou5 requested a review from wenjing April 7, 2026 17:18
Signed-off-by: qians <qiangezaici@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant