Skip to content

Document vCards in the specification#5724

Merged
Hocuri merged 3 commits intomainfrom
Hocuri-patch-1
Jun 29, 2024
Merged

Document vCards in the specification#5724
Hocuri merged 3 commits intomainfrom
Hocuri-patch-1

Conversation

@Hocuri
Copy link
Copy Markdown
Collaborator

@Hocuri Hocuri commented Jun 28, 2024

Also, move the Miscellaneous section to the end again and update the table of contents with https://derlin.github.io/bitdowntoc/.

@Hocuri Hocuri requested review from iequidoo and link2xt June 28, 2024 14:39
spec.md Outdated
and `VERSION` (which version of the vCard standard you're using),
and if available it SHOULD contain `FN` (display name),
`PHOTO` (avatar),
`KEY` (public key), and
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you say in which format the key must be?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in base64, in our case we obtain it by calling to_base64() on the pgp crate's SignedPublicKey. Is there a way to further specify the key format than saying it's base64?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find a to_base64 in SignedPublicKey. Can you help me understand what function is used in the conversion?

And/or: Does the format look different from normal "ASCII Armored" OpenPGP keys?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find a to_base64 in SignedPublicKey. Can you help me understand what function is used in the conversion?

It's implemented by the deltachat::key::DcKey trait.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! So it's this code.

The code takes the SignedPublicKey, and serialized it as a "binary" OpenPGP object (not ASCII Armored), and then base64 encodes that.

I don't know what the best language is, for the spec.md documentation. But I'd suggest something along the lines: "An OpenPGP public key, in binary format, encoded with vanilla base64 (note that this is different from the OpenPGP 'ASCII Armor' format)".

Copy link
Copy Markdown
Collaborator Author

@Hocuri Hocuri Jun 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the PR, thanks!

I also checked that the key in the vCard created by protonmail can be imported successfully. So, apparently we're doing everything correctly 👍 (and it's correct that we're not using ASCII Armor - while I had heard about it, I neither had it on my radar nor did I know that it's different from what we're doing)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! :)

Copy link
Copy Markdown
Contributor

@hpk42 hpk42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other than the comment this looks fine.
It's only a rough spec like the rest so it's consistent ;)

spec.md Outdated
and `VERSION` (which version of the vCard standard you're using),
and if available it SHOULD contain `FN` (display name),
`PHOTO` (avatar),
`KEY` (public key), and
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find a to_base64 in SignedPublicKey. Can you help me understand what function is used in the conversion?

It's implemented by the deltachat::key::DcKey trait.

@Hocuri Hocuri merged commit 68b6239 into main Jun 29, 2024
@Hocuri Hocuri deleted the Hocuri-patch-1 branch June 29, 2024 07:44
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.

4 participants