---
name: "otr_toolkit"
section: "1"
platform: "linux"
package: "libotr"
version: "4.1.1-6"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/otr_toolkit"
---

# otr\_toolkit(1)

Process Off-the-Record Messaging transcripts

## NAME

otr\_parse, otr\_sesskeys, otr\_mackey, otr\_readforge, otr\_modify, otr\_remac - Process Off-the-Record Messaging transcripts

## SYNOPSIS

**otr\_parse**\
 **otr\_sesskeys** *our\_privkey their\_pubkey*\
 **otr\_mackey** *aes\_enc\_key*\
 **otr\_readforge** *aes\_enc\_key \[newmsg\]*\
 **otr\_modify** *mackey old\_text new\_text offset*\
 **otr\_remac** *mackey sender\_instance receiver\_instance flags snd\_keyid rcv\_keyid pubkey counter encdata revealed\_mackeys*

## DESCRIPTION

Off-the-Record (OTR) Messaging allows you to have private conversations over IM by providing:\
  \- Encryption\
    \- No one else can read your instant messages.\
  \- Authentication\
    \- You are assured the correspondent is who you think it is.\
  \- Deniability\
    \- The messages you send do *not* have digital signatures that are\
      checkable by a third party.  Anyone can forge messages after a\
      conversation to make them look like they came from you.  However,\
      *during* a conversation, your correspondent is assured the messages\
      he sees are authentic and unmodified.\
  \- Perfect forward secrecy\
    \- If you lose control of your private keys, no previous conversation\
      is compromised.

The OTR Toolkit is useful for analyzing and/or forging OTR messages.  Why do we offer this?  Primarily, to make absolutely sure that transcripts of OTR conversations are really easy to forge after the fact.  \[Note that *during* an OTR conversation, messages can't be forged without real-time access to the secret keys on the participants' computers, and in that case, all security has already been lost.\]  Easily-forgeable transcripts help us provide the "Deniability" property: if someone claims you said something over OTR, they'll have no proof, as anyone at all can modify a transcript to make it say whatever they like, and still have all the verification come out correctly.

Here are the six programs in the toolkit:

 \- otr\_parse\
    \- Parse OTR messages given on stdin, showing the values of all the\
      fields in OTR protocol messages.

 \- otr\_sesskeys our\_privkey their\_pubkey\
    \- Shows our public key, the session id, two AES and two MAC keys\
      derived from the given Diffie-Hellman keys (one private, one public).

 \- otr\_mackey aes\_enc\_key\
    \- Shows the MAC key derived from the given AES key.

 \- otr\_readforge aes\_enc\_key \[newmsg\]\
    \- Decrypts an OTR Data message using the given AES key, and displays\
      the message.\
    \- If newmsg is given, replace the message with that one, encrypt\
      and MAC it properly, and output the resulting OTR Data Message.\
      This works even if the given key was not correct for the original\
      message, so as to enable complete forgeries.

 \- otr\_modify mackey old\_text new\_text offset\
    \- Even if you can't read the data because you don't know either\
      the AES key or the Diffie-Hellman private key, but you can make a\
      good guess that the substring "old\_text" appears at the given\
      offset in the message, replace the old\_text with the new\_text\
      (which must be of the same length), recalculate the MAC with the\
      given mackey, and output the resulting Data message.\
    \- Note that, even if you don't know any text in an existing message,\
      you can still forge messages of your choice using the\
      otr\_readforge command, above.

 \- otr\_remac mackey sender\_instance receiver\_instance flags snd\_keyid rcv\_keyid pubkey counter encdata revealed\_mackeys\
    \- Make a new OTR protocol version 3 Data Message, with the given\
      pieces (note that the data part is already encrypted).  MAC it \
      with the given mackey.

## SEE ALSO

**Off-the-Record Messaging**, at https://www.cypherpunks.ca/otr/ ⟨https://www.cypherpunks.ca/otr/⟩

## AUTHOR

otr\_toolkit was written by the OTR Dev Team \<otr@cypherpunks.ca\>.
