Skip to content
Joel Lonbeck edited this page Dec 15, 2015 · 3 revisions

DEPRECATED Signing will not be featured in translationStudio.

The Signer verifies and creates digital signatures for translations. For an overview of the entire signing process (not just what happens on the app) read the Signing Overview.

##Interface

  • enum verifySignature(pubkey key, string sig, string data)
  • pubkey loadPublicKey(string path)
  • privkey loadPrivateKey(string path)
  • string sign(privkey key, string data) returns the signature

Load Keys

The Signer must be able to load public and private keys that can then be used in the signing and verification process. Most often public keys will come in the form of a Signing Identity (SI). Please read the Signing Identity Format section in Signing Overview for details on how the SI is structured.

Here is an example of a SI

-----BEGIN PUBLIC KEY-----
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAESwmkZ0AJIQo9cELigBaEPaVbQYnWOWhq
ouunp1AGWSgv+KvV/RS9AiRAMjgr4robcgxDjjrdrESyCiTbRehl1yGT0NxfkGhp
qkjQDUV4/4UH63jfRO3F6d1DtBvrxXJp
-----END PUBLIC KEY-----
-----BEGIN ORG INFO-----
ewogICJjcmVhdGVkIjogIjIwMTUtMDItMTgiLCAKICAiZW1haWwiOiAiYWRtaW5A
dW5mb2xkaW5nd29yZC5vcmciLCAKICAiZXhwaXJlcyI6ICIyMDI1LTAyLTE4Iiwg
CiAgIm1vZGlmaWVkIjogIjIwMTUtMDItMTgiLCAKICAib3JnIjogInVuZm9sZGlu
Z1dvcmQiLCAKICAic2x1ZyI6ICJ1VyIsIAogICJ3ZWIiOiAiaHR0cHM6Ly91bmZv
bGRpbmd3b3JkLm9yZyIKfQo=
-----END ORG INFO-----
-----BEGIN SIG-----
MGUCMQCzPq6PmU1uWPgho1JEHUsQOF0aEj8+6AtW46GzZP8WzZ+7NgCT4nMiR5qk
bGa6axwCMCKH4MB8Yt6cajXIDtJv6fFIUCSGjzn4Ixy9e+eVk0rPtUwy91qjxfXq
Ok/mJ2mHhQ==
-----END SIG-----

And here is an example signature of the English OBS source text date_modified="20150210"

[
  { "si": "uW",
    "sig": "MGYCMQDN7R4lTqR579DwbEQjGa7gBDlQrqv84fv7EPJoTC7XwYK0H2ODQ3UQL5QaOiE2+h0CMQC0JPChVkm8FbX+OhFNFl8D1bp96dMpdE6XOchCE0j/tDACWIQGV/icjbD4m5yb2Vk="
  }
]

Verify Signing Entity

After loading a Signing Identity the Signer must be able to verify the represented Signing Entity. The Signer should be able to determine the condition of the Signing Entity which must be one of the following:

  • Verified everything is ok
  • Expired everything is ok, but the SE is expired
  • Error the SE is corrupt
  • Invalid the SE is invalid

Verify Signatures

The Signer must be able to verify a signature given the public key and signed data.

Sign Content

The Signer must be able to sign content using a private key

Generate Deterministic Private Key

The Signer must be able to generate a deterministic private key using a string provided by the user.