IACR / latex

Latex classes for IACR publications. We will start with the new journal proposal.
8 stars 1 forks source link

BibTeX parser failure #250

Closed GeeLaw closed 3 weeks ago

GeeLaw commented 3 weeks ago

The following BibTeX entry could not be parsed upon submission to IACR CiC volume 1 issue 2:

@article{DHMR08,
  title = {{\egroup\bgroup\itshape\bgroup A}d-Hoc{\egroup} Threshold Broadcast Encryption with Shorter Ciphertexts},
  author = {Vanesa Daza
    and Javier Herranz
    and Paz Morillo
    and Carla R{\`a}fols},
  journal = {Electronic Notes in Theoretical Computer Science},
  volume = {192},
  number = {2},
  pages = {3--15},
  year = {2008},
  note = {Proceedings of the Third Workshop on Cryptography for Ad-hoc Networks (WCAN 2007)},
  issn = {1571-0661},
  doi = {10.1016/j.entcs.2008.05.002},
}

Now, let me explain why this monster is correct. According to Tame the BeaST:

  1. BibTeX only looks at {} for grouping. Braces must be balanced.
  2. If a { at the outer-most level is followed immediately by \, it is called a special character. (But there is a bug! See below.)
  3. Otherwise, the balanced {} is a usual group.
  4. BibTeX function change.case$ will change the cases of words according to some complex rule.

The title of a citable item should be encoded with the first letters of all words (except "small words" like "a", "an") capitalized. Bibliography styles will use change.case$ to change them into the required casing format, if necessary. The t format (officially, title) is what I call a "sentence case", which means that the first word, as well as every first word after : followed by space, is kept in Title case, and that all the other words are in lower case, except all the content inside a usual group (not a special character) is kept intact. In particular, alphaurl.bst does this to conference papers (inproceedings).

Suppose title is Ad-Hoc Encryption, then its t case is Ad-hoc encryption. Now the Ad-Hoc needs to be italicized.

From BibTeX's perspective, it is

  buggy: {\egroup\bgroup\itshape\bgroup A}
   text: d-Hoc
sp-char: {\egroup}
...

From LaTeX's perspective, it is

group: {\egroup
group: delimiter: \bgroup
         content: \itshape
        subgroup: \bgroup A}
         content: d-Hoc
        subgroup: {\egroup
       delimiter: }
...

The reason of this encoding is also related to purify$ function --- the four encodings will yield

when purified, and only the last one is desired. The purify$ result could affect sorting.

The method of crazy {} and \bgroup\egroup is suggested in Tame the BeaST. For the time being, I am converting my BibTeX entry to a simpler encoding that happens to yield correct result in my paper.

kmccurley commented 3 weeks ago

Thanks for this report. There is another simple solution to this: use {\textit{Ad-Hoc}} in the title of the reference. The Tame the Beast document was basically an attempt to reverse engineer the abomination that BibTeX was, but it can also be interpreted of why people should use biblatex instead.

I don't consider this to be very important anyway, since the use of "face markup" in the title of a reference is often eliminated (even by the original publisher). While it's nice to preserve the original view of the title, it's not necessary. In this case the official bibtex exported by the publisher can be found by clicking on the cite reference:

@article{DAZA20083,
title = {Ad-Hoc Threshold Broadcast Encryption with Shorter Ciphertexts},
journal = {Electronic Notes in Theoretical Computer Science},
volume = {192},
number = {2},
pages = {3-15},
year = {2008},
note = {Proceedings of theThird Workshop on Cryptography for Ad-hoc Networks (WCAN 2007)},
issn = {1571-0661},
doi = {https://doi.org/10.1016/j.entcs.2008.05.002},
url = {https://www.sciencedirect.com/science/article/pii/S1571066108003162},
author = {Vanesa Daza and Javier Herranz and Paz Morillo and Carla Ràfols},
keywords = {Threshold encryption, ad-hoc and dynamic groups, ElGamal cryptosystem},
abstract = {In a threshold broadcast encryption scheme, a sender chooses (ad-hoc) a set of n receivers and a threshold t, and then encrypts a message by using the public keys of all the receivers, in such a way that the original plaintext can be recovered only if at least t receivers cooperate. This kind of scheme has many applications in mobile ad-hoc networks, characterized by their lack of infrastructure as well as for the high dynamism of their nodes. Threshold broadcast encryption schemes are much more appropriate for mobile ad-hoc scenarios than standard threshold public key encryption schemes, where the set of receivers and the threshold for decryption must be known in advance (and remain the same for the rest of the protocol). Previously proposed threshold broadcast encryption schemes have ciphertexts which contain at least n group elements. In this paper, we propose a new scheme where the ciphertexts contain essentially n−t group elements. The construction uses secret sharing techniques and the ElGamal public key cryptosystem as basic tools. We formally prove the security of the scheme, by reduction to the security of ElGamal cryptosystem.}
}

This is consistent with the officially exported metadata for the reference through crossref (the issuer of the DOI).