Scanning a vcard QR-code should use the PGP key for E2EE

Scanning a QRcode that contains a vcf with all required properties (version, email, fn, key, rev) results in DC trying to initiate contact through unencrypted plaintext email. This is blocked by chatmail.

However, if i scan the QR_code with an external barcode reader app, save it to a file, send the file to the saved note chat in DC and then click on the uploaded file (contact button), it does initiate encryption correctly!

I couldn’t find a duplicate for this issue, but some are loosely related in the same topic:

Here is an example vcard:

yes, that would be cool to support KEY: field when copying a vcard to the QR code.

however, it seems not to be a priority currently as (1) Delta Chat does not created these QR codes - nor does any other apps i know of and (2) while the space fits for ECC keys, it will not for longer keys, as RSA or PQC - so we probably do not want to push for that usecase too much.

still, if it is easy to add (esp. as keys in vcards are already supported), it might makes sense

  1. Indirection could also be supported such that the QR could be a single HTTPS: URL pointing to the vcard file on the website of the person who own the given business card. The URL opens in a web browser, the browser downloads the vcf file according to disposition, the vcf mime handler intent can open the contacts app (or Delta Chat itself) with this downloaded file. Such a file could be of any length.

  2. For longer encryption keys, a more efficient QR-aware encoding scheme could reduce the number of bits strictly necessary.

  3. The KEY vcard property encodes an URI that can also point to a remote resource via FTPS or HTTPS, similarly to many other properties. This could even point to the existing WKD path for services offering that, or to just a static file hosted on the chatmail instance.

  4. The remote filename might encode the fingerprint if immutability is desired or that could be encoded in a separate OPENPGP2FPR link in the URL property.

  5. Each vcard may contain multiple KEY properties. Thus, a smaller encryption key may be included inline for emergency use while a more secure one may be referenced by its remote URL.