summaryrefslogtreecommitdiffstats
path: root/include/mincrypt
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2012-07-25 12:08:33 -0700
committerDoug Zongker <dougz@android.com>2012-07-25 13:09:17 -0700
commit35d9ad5ae72de846967b91aed97060f0e8558661 (patch)
treed94d48e75beabd007dbe2bf3001b933f02cac649 /include/mincrypt
parent237c80bf4cbc8e8fa3936ec8382b247aa4e96be2 (diff)
downloadsystem_core-35d9ad5ae72de846967b91aed97060f0e8558661.zip
system_core-35d9ad5ae72de846967b91aed97060f0e8558661.tar.gz
system_core-35d9ad5ae72de846967b91aed97060f0e8558661.tar.bz2
support e=65537 for libmincrypt, DumpPublicKey
The output produced by DumpPublicKey now has a version tag on each line (ie, each key). The existing keys are retroactively dubbed "version 1", and we add a version 2 for 2048-bit e=65537 keys. Change-Id: I204ec615c8f2346670220a1aeb99269e4abd5f81
Diffstat (limited to 'include/mincrypt')
-rw-r--r--include/mincrypt/rsa.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/mincrypt/rsa.h b/include/mincrypt/rsa.h
index 7d7d571..d7429fc 100644
--- a/include/mincrypt/rsa.h
+++ b/include/mincrypt/rsa.h
@@ -13,14 +13,14 @@
** be used to endorse or promote products derived from this software
** without specific prior written permission.
**
-** THIS SOFTWARE IS PROVIDED BY Google Inc. ``AS IS'' AND ANY EXPRESS OR
+** THIS SOFTWARE IS PROVIDED BY Google Inc. ``AS IS'' AND ANY EXPRESS OR
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
** EVENT SHALL Google Inc. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-** OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+** OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
** OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
@@ -42,6 +42,7 @@ typedef struct RSAPublicKey {
uint32_t n0inv; /* -1 / n[0] mod 2^32 */
uint32_t n[RSANUMWORDS]; /* modulus as little endian array */
uint32_t rr[RSANUMWORDS]; /* R^2 as little endian array */
+ int exponent; /* 3 or 65537 */
} RSAPublicKey;
int RSA_verify(const RSAPublicKey *key,