Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update locked wallet description and example data for password based encrytion #111

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 19 additions & 21 deletions docs/data-model.html
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,11 @@ <h2>Locked Wallet</h2>
representation of a wallet.
</p>

<p>For password based encryption, it is recommended to use PBES2-HS512+A256KW. <strong>p2s</strong> represents the seed that was used during key deriviation and <strong>p2c</strong> represents the iteration count.</p>

<p>The ciphertext should be an encrypted version of the unlocked wallet representation described below.</p>


<pre class="example highlight" title="An encrypted wallet example">
{
"@context": [
Expand All @@ -794,33 +799,26 @@ <h2>Locked Wallet</h2>
{
"id": "urn:uuid:e8fc7810-9524-11ea-bb37-0242ac130002",
"jwe": {
"protected": "eyJlbmMiOiJYQzIwUCJ9",
"recipients": [
{
"header": {
"kid": "did:key:z6MkjMSYauuMgx9azEyUnTW5o5jFRkbBu5T83f39uNwnsGmm#z6LSoGtZSrUMZudAagzEfYf7k8jHZcGD79Sox7v4wCkDKNSw",
"alg": "ECDH-ES+A256KW",
"epk": {
"kty": "OKP",
"crv": "X25519",
"x": "RfXdxTfIzilWBzWWX3ovHBDzgDcLNy0BFJWSxa0dqnw"
},
"apu": "RfXdxTfIzilWBzWWX3ovHBDzgDcLNy0BFJWSxa0dqnw",
"apv": "ZGlkOmtleTp6Nk1rak1TWWF1dU1neDlhekV5VW5UVzVvNWpGUmtiQnU1VDgzZjM5dU53bnNHbW0jejZMU29HdFpTclVNWnVkQWFnekVmWWY3azhqSFpjR0Q3OVNveDd2NHdDa0RLTlN3"
},
"encrypted_key": "-ABaawsVfTxJKmYVMhC0UW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oGiTw5RfCX4gA=="
}
],
"iv": "wJ8Mol+iVntgZU6/",
"ciphertext": "gxUYD0f/WORxXF1s6VTRn+3mF/5zips2qZtUUUjTuW/L5sO5dcCGtPwmRjuatDgk2A7f... ",
"tag": "pxbfT0lDBU/RZjGlTmO+1w=="
}
}
]
}
}
</pre
>
</pre>
</section>

<section>
Expand Down