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

Document the exact filter "key" format #28

Open
jcjones opened this issue Jul 26, 2019 · 1 comment
Open

Document the exact filter "key" format #28

jcjones opened this issue Jul 26, 2019 · 1 comment

Comments

@jcjones
Copy link
Contributor

jcjones commented Jul 26, 2019

This line shows that the keys of the bloom filter are the binary concatenation of two binary data fields:

key = issuerKey + bytearray.fromhex(sHex)

sha256(DER-encoded issuer SPKI) || DER-encoded serial number

The first part, being SHA256, is 256-bits long, whereas the remaining bits are the binary serial number in DER-encoding.

SHA256 Hash of DER Subject Public Key Information

The DER-encoded SPKI of the certificate's issuer is then run through the sha256 algorithm.

So

   * A) signing (probably-intermediate) Certificate Authority
   |
   +--------->  B) End Entity in question

We'd be taking the DER-encoded SPKI of (A), taking sha256 of it, and using that.

Serial

serial is the DER-encoded SerialNumber field from the certificate TBSCertificate data structure.

This issue should save this documentation in-tree.

Examples

One per line. Note that the first 256 bits are the SHA256 of the issuer's SPKI, and the remaining bits are the DER-encoded serial number.

VYZwGiJkq3NNo1YRI2RGiSTI1mqTWG8zDcRf1/KAN6IA4yCQuuNtGYIAAAAAVM+Zvw==
VYZwGiJkq3NNo1YRI2RGiSTI1mqTWG8zDcRf1/KAN6IAyakQEgaRVjEAAAAAVM3usw==
9frFyfDp+D9WCFjQblKwXUi5EgVRtx22594YJETOc/ZsYbPf7Xs6sf0eNzRY/mNvbLIp9g==
Slt48iBVTjuRQJTjbzopminRrHSGtndY0/sj0lFf9QlRgn9Fue01RWA5VHAY0fug
Slt48iBVTjuRQJTjbzopminRrHSGtndY0/sj0lFf9QkSf162P2BT6Wry7y01ERiH
Slt48iBVTjuRQJTjbzopminRrHSGtndY0/sj0lFf9QlEWoJId+CLHv/n0y+Px1hf
SDG5orEv8iX6MNenIAxa8nQFNpROB/6+llsZdXHZNqsN3w8Vsrce7ZCm3os1cLa3
tYkfFN27P1GUjH5ME128BCg302dL2iwOYhz5wwFJb518mCjbYqWeCF+TI/6F+TydHhe4aA==
@jcjones
Copy link
Contributor Author

jcjones commented Jan 6, 2020

CRLite Filter Diagram - Identifier(2)

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

No branches or pull requests

1 participant