Skip to content

Commit c557179

Browse files
authored
CHIP-0030: Wallet signer BLOB subdivision (#105)
* Add new CHIP for Wallet signer BLOB subdivision * Assign CHIP-0030 * Move CHIP-30 to Review * Update permalink and move to Last Call * Move CHIP-30 to Final status
1 parent 22ca6de commit c557179

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

CHIPs/chip-0030.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
CHIP Number | 0030
2+
:-------------|:----
3+
Title | Wallet signer BLOB subdivision
4+
Description | A standard technique for subdividing (chunking) BLOB data used in the wallet signer protocol
5+
Author | [Matt Hauff](https://github.com/Quexington)
6+
Editor | [Dan Perry](https://github.com/danieljperry)
7+
Comments-URI | [CHIPs repo, PR #105](https://github.com/Chia-Network/chips/pull/105)
8+
Status | Final
9+
Category | Process
10+
Sub-Category | Tooling
11+
Created | 2024-03-14
12+
Requires | [0027](https://github.com/Chia-Network/chips/pull/102)
13+
Replaces | None
14+
Superseded-By | None
15+
16+
## Abstract
17+
18+
[CHIP-0029](https://github.com/Chia-Network/chips/pull/104) provides a method for serializing JSON data from the APIs laid out in [CHIP-0027](https://github.com/Chia-Network/chips/pull/102) into binary large object (BLOB) data. This CHIP provides a method for subdividing BLOB data into multiple chunks.
19+
20+
## Motivation
21+
22+
BLOBs used in the Chia wallet signer protocol can be too large to send in one piece. Therefore, a method is needed to subdivide, or "chunk" the data into multiple pieces. For now, this method is only used with QR codes, but in the future it could be applied more broadly to other types of BLOBs.
23+
24+
## Backwards Compatibility
25+
26+
This CHIP does not introduce any backwards incompatibilities.
27+
28+
## Specification
29+
30+
The primary method is called `create_chunks_for_blob`:
31+
32+
**ARGUMENTS**
33+
```py
34+
blob: bytes
35+
bytes_per_chunk: int
36+
```
37+
38+
**RETURNS**
39+
The `blob`, broken into chunks of size `bytes_per_chunk`.
40+
41+
Each chunk is appended with [`x`, `y`], where `x` is the current chunk number, and `y` is the total number of chunks.
42+
43+
---
44+
45+
## Reference Implementation
46+
47+
This CHIP is implemented in the `hsms` GitHub repository, under [byte_chunks.py](https://github.com/Chia-Network/hsms/blob/27b74ab853498607506aa9a517203f85bcdac725/hsms/util/byte_chunks.py).
48+
49+
## Security
50+
51+
CNI has conducted an internal security audit of the code from this CHIP's reference implementation.
52+
53+
## Additional Assets
54+
55+
None
56+
57+
## Copyright
58+
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

0 commit comments

Comments
 (0)