Encryption keys and digital signatures: two different functions
A confidential message must reach the right person without becoming readable to whoever intercepts it. Whoever receives it must also be able to tell whether it has been altered and where it came from. These are different needs: encryption protects the confidentiality of the content; a cryptographic signature makes it possible to verify its integrity and origin with respect to a key. Confusing them leads to attributing to a message guarantees it may not have.
Encryption decides who can read
Imagine sending a colleague a confidential report. You want her to be able to read it, while anyone who collects a copy during transport finds only encrypted data. Encryption transforms readable content into a form that requires the correct key to be decrypted: this is the function described also in the NIST glossary.
The protection depends on the algorithm, on its correct implementation and on key management. It also concerns a precise part of the journey: if someone can read the report on your device before encryption, or on your colleague's screen after decryption, they can access the content without breaking the cryptography.
Confidentiality and origin remain two separate aspects. In a public-key scheme, for example, anyone who knows the recipient's public key can use it to prepare encrypted content for them. The fact that the recipient can open it does not, on its own, identify who sent it.
What a signature verifies
A cryptographic signature is generated using a private signing key. The corresponding public key makes it possible to verify the signature on the received data. If the verification succeeds, with a secure and correctly used system, you have a cryptographic guarantee that those data correspond to the signature and that the signature comes from the corresponding private key.
In the example report, changing a figure after signing makes verification of the original signature fail. This is an integrity protection: it helps detect a modification, without physically preventing someone from attempting one. The NIST Digital Signature Standard distinguishes precisely the detection of modifications and the authentication of the signer.
The signed content, however, can remain perfectly readable. To keep it confidential, encryption is also needed. And a valid signature can accompany a wrong report: it proves a cryptographic link to the data, not the truth of what they state.
This mechanism, on its own, is not equivalent to a qualified electronic signature, which requires further legal and technical conditions.
From the key to the person
To recognize your colleague, you must know that the public key used in the verification is really hers. A name written next to a key is a label: someone could replace both the name and the key and sign with their own private key. The mathematical verification would succeed, but it would be confirming the wrong link.
The link can be established through different procedures, depending on the system: a certificate with appropriate checks, or comparing a fingerprint or a code over a channel you trust. The goal is to check the link between the person and the cryptographic material received.
It also matters who keeps the private key. If it is stolen, another person can use it to produce signatures that pass verification. A valid signature, on its own, does not tell who actually held the device or control of the key at that moment.
Different keys for different tasks
The words "public" and "private" do not make the keys interchangeable. In a signature system, the private one signs and the public one verifies. This does not mean the same keys are suited to encrypting and decrypting. It depends on the algorithm and on the use the protocol intends. Describing a signature as "encrypting with the private key" is therefore a misleading shortcut.
In modern communications text is often protected with symmetric keys: shared secrets used for encryption and decryption. To establish them, devices can use a key agreement or a key-encapsulation mechanism, called KEM. These are different ways to obtain a shared secret through an exchange; they are not signatures of the message. The NIST recommendations on KEMs explain that this secret can then feed symmetric encryption and authentication operations.
The keys used during a session can also be derived and updated over time. A key that identifies a participant and a key that protects a particular exchange can therefore have different duration and function.
Authenticating a message without signing it
A protocol can also protect the integrity of messages through symmetric tools. Authenticated encryption with associated data, or AEAD, combines confidentiality with an authenticity check based on a secret key. The recipient verifies the check before accepting the content, according to the protocol's rules.
This verification is not equivalent to a signature that anyone with a public key can check: whoever shares the secret can also generate valid checks. An app can therefore describe a message as "authenticated" without digitally signing every message. The RFC 5116 specification describes the AEAD interface, distinguishing these tools from the procedures that manage keys.
What changes in an exchange with Layergram
In Layergram this distinction makes a concrete step easier to understand: before sending confidential content, people exchange and verify their identities. The security page makes clear that no Layergram server establishes which key belongs to whom. Receiving a contact link does not replace verification with the other person.
If you want to share the example report as text, you and your colleague can verify the contact by comparing the elements shown by the app over a reliable channel. Then you compose the confidential text in Layergram and share the protected result in the chat you already use. Your colleague opens it in Layergram on her own device. The getting-started guide illustrates these steps.
Encryption happens before transport into the chat: the external channel receives the protected form, rather than that plaintext. Contact verification instead serves to link the imported identity to the chosen person. These are complementary protections. What remains outside the app's control are the metadata kept by the transport, an already compromised device and the copies the recipient can make of the content.
A practical check before trusting
When a service talks about "keys" or "authenticated messages", look for an explanation of what protects the content and of how it recognizes the other person. If a key or an identity changes, check the expected procedure before trusting it with new confidential data.
In everyday use you do not need to choose every algorithm by hand. What matters is understanding that reading a message, verifying its integrity and knowing whom a key belongs to are different results. The security of the exchange depends on how the system links them and on how you protect the devices on which the text becomes readable again.