1Legacy classifier identifies LGPL-2.1 2EXPECTED:Copyright,LGPL-3.0 3/** 4 * @license 5 * GNU LESSER GENERAL PUBLIC LICENSE 6 * Version 3, 29 June 2007 7 * 8 * Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> 9 * Everyone is permitted to copy and distribute verbatim copies 10 * of this license document, but changing it is not allowed. 11 * 12 * 13 * This version of the GNU Lesser General Public License incorporates 14 * the terms and conditions of version 3 of the GNU General Public 15 * License, supplemented by the additional permissions listed below. 16 * 17 * 0. Additional Definitions. 18 * 19 * As used herein, "this License" refers to version 3 of the GNU Lesser 20 * General Public License, and the "GNU GPL" refers to version 3 of the GNU 21 * General Public License. 22 * 23 * "The Library" refers to a covered work governed by this License, 24 * other than an Application or a Combined Work as defined below. 25 * 26 * An "Application" is any work that makes use of an interface provided 27 * by the Library, but which is not otherwise based on the Library. 28 * Defining a subclass of a class defined by the Library is deemed a mode 29 * of using an interface provided by the Library. 30 * 31 * A "Combined Work" is a work produced by combining or linking an 32 * Application with the Library. The particular version of the Library 33 * with which the Combined Work was made is also called the "Linked 34 * Version". 35 * 36 * The "Minimal Corresponding Source" for a Combined Work means the 37 * Corresponding Source for the Combined Work, excluding any source code 38 * for portions of the Combined Work that, considered in isolation, are 39 * based on the Application, and not on the Linked Version. 40 * 41 * The "Corresponding Application Code" for a Combined Work means the 42 * object code and/or source code for the Application, including any data 43 * and utility programs needed for reproducing the Combined Work from the 44 * Application, but excluding the System Libraries of the Combined Work. 45 * 46 * 1. Exception to Section 3 of the GNU GPL. 47 * 48 * You may convey a covered work under sections 3 and 4 of this License 49 * without being bound by section 3 of the GNU GPL. 50 * 51 * 2. Conveying Modified Versions. 52 * 53 * If you modify a copy of the Library, and, in your modifications, a 54 * facility refers to a function or data to be supplied by an Application 55 * that uses the facility (other than as an argument passed when the 56 * facility is invoked), then you may convey a copy of the modified 57 * version: 58 * 59 * a) under this License, provided that you make a good faith effort to 60 * ensure that, in the event an Application does not supply the 61 * function or data, the facility still operates, and performs 62 * whatever part of its purpose remains meaningful, or 63 * 64 * b) under the GNU GPL, with none of the additional permissions of 65 * this License applicable to that copy. 66 * 67 * 3. Object Code Incorporating Material from Library Header Files. 68 * 69 * The object code form of an Application may incorporate material from 70 * a header file that is part of the Library. You may convey such object 71 * code under terms of your choice, provided that, if the incorporated 72 * material is not limited to numerical parameters, data structure 73 * layouts and accessors, or small macros, inline functions and templates 74 * (ten or fewer lines in length), you do both of the following: 75 * 76 * a) Give prominent notice with each copy of the object code that the 77 * Library is used in it and that the Library and its use are 78 * covered by this License. 79 * 80 * b) Accompany the object code with a copy of the GNU GPL and this license 81 * document. 82 * 83 * 4. Combined Works. 84 * 85 * You may convey a Combined Work under terms of your choice that, 86 * taken together, effectively do not restrict modification of the 87 * portions of the Library contained in the Combined Work and reverse 88 * engineering for debugging such modifications, if you also do each of 89 * the following: 90 * 91 * a) Give prominent notice with each copy of the Combined Work that 92 * the Library is used in it and that the Library and its use are 93 * covered by this License. 94 * 95 * b) Accompany the Combined Work with a copy of the GNU GPL and this license 96 * document. 97 * 98 * c) For a Combined Work that displays copyright notices during 99 * execution, include the copyright notice for the Library among 100 * these notices, as well as a reference directing the user to the 101 * copies of the GNU GPL and this license document. 102 * 103 * d) Do one of the following: 104 * 105 * 0) Convey the Minimal Corresponding Source under the terms of this 106 * License, and the Corresponding Application Code in a form 107 * suitable for, and under terms that permit, the user to 108 * recombine or relink the Application with a modified version of 109 * the Linked Version to produce a modified Combined Work, in the 110 * manner specified by section 6 of the GNU GPL for conveying 111 * Corresponding Source. 112 * 113 * 1) Use a suitable shared library mechanism for linking with the 114 * Library. A suitable mechanism is one that (a) uses at run time 115 * a copy of the Library already present on the user's computer 116 * system, and (b) will operate properly with a modified version 117 * of the Library that is interface-compatible with the Linked 118 * Version. 119 * 120 * e) Provide Installation Information, but only if you would otherwise 121 * be required to provide such information under section 6 of the 122 * GNU GPL, and only to the extent that such information is 123 * necessary to install and execute a modified version of the 124 * Combined Work produced by recombining or relinking the 125 * Application with a modified version of the Linked Version. (If 126 * you use option 4d0, the Installation Information must accompany 127 * the Minimal Corresponding Source and Corresponding Application 128 * Code. If you use option 4d1, you must provide the Installation 129 * Information in the manner specified by section 6 of the GNU GPL 130 * for conveying Corresponding Source.) 131 * 132 * 5. Combined Libraries. 133 * 134 * You may place library facilities that are a work based on the 135 * Library side by side in a single library together with other library 136 * facilities that are not Applications and are not covered by this 137 * License, and convey such a combined library under terms of your 138 * choice, if you do both of the following: 139 * 140 * a) Accompany the combined library with a copy of the same work based 141 * on the Library, uncombined with any other library facilities, 142 * conveyed under the terms of this License. 143 * 144 * b) Give prominent notice with the combined library that part of it 145 * is a work based on the Library, and explaining where to find the 146 * accompanying uncombined form of the same work. 147 * 148 * 6. Revised Versions of the GNU Lesser General Public License. 149 * 150 * The Free Software Foundation may publish revised and/or new versions 151 * of the GNU Lesser General Public License from time to time. Such new 152 * versions will be similar in spirit to the present version, but may 153 * differ in detail to address new problems or concerns. 154 * 155 * Each version is given a distinguishing version number. If the 156 * Library as you received it specifies that a certain numbered version 157 * of the GNU Lesser General Public License "or any later version" 158 * applies to it, you have the option of following the terms and 159 * conditions either of that published version or of any later version 160 * published by the Free Software Foundation. If the Library as you 161 * received it does not specify a version number of the GNU Lesser 162 * General Public License, you may choose any version of the GNU Lesser 163 * General Public License ever published by the Free Software Foundation. 164 * 165 * If the Library as you received it specifies that a proxy can decide 166 * whether future versions of the GNU Lesser General Public License shall 167 * apply, that proxy's public statement of acceptance of any version is 168 * permanent authorization for you to choose that version for the 169 * Library. 170 */ 171 172// OpenPGP.js - An OpenPGP implementation in javascript 173// Copyright (C) 2015-2016 Decentral 174// 175// This library is free software; you can redistribute it and/or 176// modify it under the terms of the GNU Lesser General Public 177// License as published by the Free Software Foundation; either 178// version 3.0 of the License, or (at your option) any later version. 179// 180// This library is distributed in the hope that it will be useful, 181// but WITHOUT ANY WARRANTY; without even the implied warranty of 182// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 183// Lesser General Public License for more details. 184// 185// You should have received a copy of the GNU Lesser General Public 186// License along with this library; if not, write to the Free Software 187// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 188 189/** 190 * @fileoverview Key encryption and decryption for RFC 6637 ECDH 191 * @requires bn.js 192 * @requires tweetnacl 193 * @requires crypto/public_key/elliptic/curve 194 * @requires crypto/aes_kw 195 * @requires crypto/cipher 196 * @requires crypto/random 197 * @requires crypto/hash 198 * @requires type/kdf_params 199 * @requires enums 200 * @requires util 201 * @module crypto/public_key/elliptic/ecdh 202 */ 203 204