Fix ZIP-316 bug in expected `dk` length

The `dk` value is 256 bits long. It's the *diversifier* that is only 88 bits long. The incoming viewing key requires the diversifier key -- not the diversifier.

This change also reflects the de facto standard in implementations up to this point, including YWallet and the [zcash_address crate](https://docs.rs/zcash_address/latest/src/zcash_address/kind/unified/ivk.rs.html).
This commit is contained in:
Andrew Arnott 2023-07-31 07:21:04 -06:00 committed by GitHub
parent af2f3aece4
commit 61654491ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -431,7 +431,7 @@ The following FVK or IVK Encodings are used in place of the
* A Sapling IVK Encoding, also with Typecode :math:`\mathtt{0x02},`
is an encoding of :math:`(\mathsf{dk}, \mathsf{ivk})` given by
:math:`\mathsf{I2LEOSP}_{88}(\mathsf{dk})\,||\,\mathsf{I2LEOSP}_{256}(\mathsf{ivk}).`
:math:`\mathsf{I2LEOSP}_{256}(\mathsf{dk})\,||\,\mathsf{I2LEOSP}_{256}(\mathsf{ivk}).`
* There is no defined way to represent a Viewing Key for a Transparent
P2SH Address in a UFVK or UIVK (because P2SH Addresses cannot be