| Server IP : 121.121.20.254 / Your IP : 216.73.216.66 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files/LibreOffice/help/en-US/text/shared/guide/ |
Upload File : |
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<base href="../../../../">
<noscript><meta http-equiv="refresh" content="0; URL=../../../../en-US/noscript.html"></noscript>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>OpenPGP</title>
<link rel="shortcut icon" href="media/navigation/favicon.ico">
<link type="text/css" href="normalize.css" rel="Stylesheet">
<link type="text/css" href="prism.css" rel="Stylesheet">
<link type="text/css" href="default.css" rel="Stylesheet">
<script type="text/javascript" src="polyfills.js"></script><script type="text/javascript" src="languages.js"></script><script type="text/javascript" src="en-US/langnames.js"></script><script type="text/javascript" src="flexsearch.debug.js"></script><script type="text/javascript" src="prism.js"></script><script type="text/javascript" src="help2.js" defer></script><script type="text/javascript" src="a11y-toggle.js" defer></script><script type="text/javascript" src="paginathing.js" defer></script><script type="text/javascript" src="en-US/bookmarks.js" defer></script><script type="text/javascript" src="en-US/contents.js" defer></script><script type="text/javascript" src="help.js" defer></script><meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
<header id="TopLeftHeader"><a class="symbol" href="en-US/text/shared/05/new_help.html"><div></div></a><a class="logo" href="en-US/text/shared/05/new_help.html"><p dir="auto">LibreOffice 24.2 Help</p></a><div class="dropdowns"><div class="modules">
<button type="button" data-a11y-toggle="modules-nav" id="modules" aria-haspopup="true" aria-expanded="false" aria-controls="modules-nav">Module</button><nav id="modules-nav" hidden=""></nav>
</div></div></header><aside class="leftside"><input id="accordion-1" name="accordion-menu" type="checkbox"><label for="accordion-1" dir="auto">Contents</label><div id="Contents" class="contents-treeview"></div></aside><div id="SearchFrame"><div id="Bookmarks">
<input id="search-bar" type="search" class="search" placeholder="Search in bookmarks for all modules" dir="auto"><div class="nav-container" tabindex="0"><nav class="index" dir="auto"></nav></div>
</div></div>
<div id="DisplayArea" itemprop="softwareHelp" itemscope="true" itemtype="http://schema.org/SoftwareApplication">
<a name="bm_id361543701916002"></a>
<meta itemprop="keywords" content="OpenPGP,document encryption">
<meta itemprop="keywords" content="file encryption,OpenPGP">
<meta itemprop="keywords" content="public key,file encryption">
<meta itemprop="keywords" content="private key,file encryption">
<meta itemprop="keywords" content="file encryption,symmetric keys">
<a name="openpgphead"></a>
<h1 id="hd_id131543693200115" dir="auto">
<a name="openpgph1"></a>Encrypting Documents with OpenPGP</h1>
<p id="par_id531543693200117" class="paragraph" dir="auto"><span class="avis">LibreOffice can encrypt documents using OpenPGP public key cryptography. The document is encrypted using a symmetric encryption algorithm.</span></p>
<div class="note">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="note" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id291631706320606" dir="auto">GPG signing only works for ODF documents.</p></div>
</div>
<br>
<a name="howtoget"></a><div class="howtoget">
<div><p class="howtogetheader" dir="auto"><a name="wie"></a>To access this command...</p></div>
<div class="howtogetbody">
<p id="par_id551543694091730" class="paragraph" dir="auto">Choose menu <span class="menuitem">File - Save as</span>, select <span class="widget">Encrypt with GPG key</span>, Click <span class="widget">Save</span>.</p>
</div>
</div>
<br>
<p id="par_id421543694016897" class="paragraph" dir="auto">LibreOffice can encrypt documents confidentially using OpenPGP. The document is encrypted using a symmetric encryption algorithm, which requires a symmetric key. Each symmetric key is used only once and is also called a session key. The document and its session key are sent to the recipient. The session key must be sent to the recipients so they know how to decrypt the document, but to protect it during transmission it is encrypted with the recipient's public key. Only the private key belonging to the recipient can decrypt the session key.</p>
<p id="par_id931543694032072" class="paragraph" dir="auto">LibreOffice uses the OpenPGP software installed in your computer. If no OpenPGP software is available you must download and install one suitable for your operating system, likely from your application store or software distribution channel.</p>
<p id="par_id131543846940809" class="paragraph" dir="auto">Here are some external GPG applications known to work with LibreOffice:</p>
<ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id831543846877587" class="listitem" dir="auto"><span class="emph">gpg4win</span> on Windows</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id191543846891252" class="listitem" dir="auto"><span class="emph">GPG Suite</span> on macOS</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
<p id="par_id791543846905735" class="listitem" dir="auto">On Linux, usually already installed:</p>
<p id="par_id411544099245722" class="listitem" dir="auto"><span class="emph">gnupg</span> - a command line utility for signing, encrypting and key management.</p>
<p id="par_id811544099299847" class="listitem" dir="auto">Graphical applications for gnupg such as <span class="emph">Seahorse</span> (gnome), <span class="emph">Kleopatra</span> and <span class="emph">KGpg</span> (KDE).</p>
<p id="par_id631544099446081" class="listitem" dir="auto"><span class="emph">gpgme</span> - an application program interface (API) to develop applications with GPG.</p>
</li>
</ul>
<p id="par_id461543694043196" class="paragraph" dir="auto">You must define a personal pair of cryptography keys with the OpenPGP application. Refer to the OpenPGP software installed on how to create a pair of keys, it is usually the first step to execute after the software installation.</p>
<h2 id="hd_id881543694319935" dir="auto">LibreOffice Encryption Setup</h2>
<div class="embedded">
<a name="cryptointro"></a>
<p id="par_id311543858573650" class="paragraph" dir="auto">Set the preferred public key for OpenPGP encryption and digital signature. These preferred keys will be pre-selected in key selection dialog every time you sign or encrypt a document, so you don't have to select it yourself when signing with one specific key frequently.</p>
</div>
<p id="par_id611543699681558" class="paragraph" dir="auto">Choose menu <span id="swlnsysencryptopenpgp_1" class="switchinline"><span hidden="true" id="MACencryptopenpgp_1" class="MAC"><span class="menuitem">LibreOffice - Preferences</span></span><span hidden="true" id="defaultencryptopenpgp_1"><span class="menuitem">Tools - Options</span></span></span><span class="menuitem"> – User Data</span>. In the <span class="emph">Cryptography</span> area:</p>
<div class="embedded">
<a name="opengpg"></a>
<h4 id="hd_id231543592828796" dir="auto">OpenPGP signing key</h4>
<p id="par_id641543592980979" class="paragraph" dir="auto"><span class="avis">Select your OpenPGP key from the drop-down list for signing ODF documents.</span></p>
<h4 id="hd_id241543592833855" dir="auto">OpenPGP encryption key</h4>
<p id="par_id41543592987773" class="paragraph" dir="auto"><span class="avis">Select your OpenPGP key from the drop-down list for encrypting ODF documents.</span></p>
<h4 id="hd_id191543593080405" dir="auto">When encrypting documents, always encrypt to self</h4>
<p id="par_id721543594922942" class="paragraph" dir="auto"><span class="avis">Mark this checkbox to also encrypt the file with your public key, so you can open the document with your private key.</span></p>
<div class="warning">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/warning.svg" alt="warning" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id851543858754421" dir="auto"><span class="emph">Keep this option selected</span>, if you ever want to be able to decrypt documents you've encrypted for other people.</p></div>
</div>
<br>
</div>
<h2 id="hd_id251543694437685" dir="auto">Encrypting documents</h2>
<p id="par_id121543694447798" class="paragraph" dir="auto">OpenPGP encryption requires the use of the public key of the recipient and this key must be available in the OpenPGP key chain stored in your computer. To encrypt a document:</p>
<ol itemprop="HowTo" itemscope="true" itemtype="http://schema.org/HowToSection" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id501543694474227" class="listitem" dir="auto">Choose <span class="menuitem">File – Save As</span>,</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id641543694535615" class="listitem" dir="auto">Enter a name for the file.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id621543694550648" class="listitem" dir="auto">Mark the <span class="widget">Encrypt with GPG key</span> checkbox.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id91543694595310" class="listitem" dir="auto">Click <span class="widget">Save</span>. LibreOffice opens the OpenPGP public key selection dialog.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id31543694619204" class="listitem" dir="auto">Choose the public key of the recipient. You can select multiple keys at the time.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id811543694660297" class="listitem" dir="auto">Click <span class="widget">OK</span> to close the dialog and save the file.</p>
</li>
</ol>
<p id="par_id981543694776604" class="paragraph" dir="auto">The file is saved encrypted with the selected public keys.</p>
<div class="warning">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/warning.svg" alt="warning" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id851543694185733" dir="auto">Only the private key belonging to the recipient can decrypt the document, unless you also encrypt for yourself.</p></div>
</div>
<br>
<h2 id="hd_id81543694812238" dir="auto">Decrypting documents</h2>
<p id="par_id731543694835151" class="paragraph" dir="auto">You can only decrypt documents that have been encrypted with your public key. To decrypt a document:</p>
<ol itemprop="HowTo" itemscope="true" itemtype="http://schema.org/HowToSection" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id801543694880414" class="listitem" dir="auto">Open the document. An Enter password prompt shows.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id891543694892170" class="listitem" dir="auto">Enter the password of the OpenPGP private key. The document is decrypted and the contents is available.</p>
</li>
</ol>
<h2 id="hd_id811543694928568" dir="auto">Difference between document encryption with OpenPGP and Save with password</h2>
<p id="par_id391543694940352" class="paragraph" dir="auto">Both commands address confidentiality, but in different ways.</p>
<p id="par_id331543694947279" class="paragraph" dir="auto">When you save a document with a password, you must remember the password inserted to open the document later. Anyone else that needs to open the document must also know the password used at save time. Therefore, the Save password must be transmitted to be known by other users.</p>
<p id="par_id351543694955038" class="paragraph" dir="auto">Files encrypted with the save password cannot be decrypted unless the save password is supplied.</p>
<p id="par_id681543694965846" class="paragraph" dir="auto">With document OpenPGP encryption, you define the set of users that can decrypt the document and you don’t need to send passwords through channels which security is unknown. Besides, the OpenPGP application manages the key chain of public keys more efficiently.</p>
<a name="relatedtopics"></a><div class="relatedtopics">
<p class="related" itemprop="mentions" dir="auto"><a name="related"></a><span class="emph">Related Topics</span>
</p>
<div class="relatedbody" itemprop="mentions">
<p id="par_id681543699425744" class="paragraph" dir="auto"><a target="_top" href="en-US/text/shared/guide/digital_signatures.html">About Digital Signatures</a>
</p>
<p id="par_id51543697316590" class="paragraph" dir="auto"><a target="_blank" href="https://en.wikipedia.org/wiki/Pretty_Good_Privacy#OpenPGP">Wikipedia on OpenPGP</a></p>
</div>
</div>
</div>
<div id="DonationFrame"></div>
<footer><div id="DEBUG" class="debug">
<h3 class="bug">Help content debug info:</h3>
<p dir="auto">This page is: <a href="https://opengrok.libreoffice.org/xref/help/source/text/shared/guide/openpgp.xhp" target="_blank">/text/shared/guide/openpgp.xhp</a></p>
<p dir="auto">Title is: OpenPGP</p>
<p id="bm_module" dir="auto"></p>
<p id="bm_system" dir="auto"></p>
<p id="bm_HID" dir="auto"></p>
</div></footer>
</body>
</html>