Gaurav Shah | e178fd9 | 2010-02-05 11:44:58 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 | * Use of this source code is governed by a BSD-style license that can be |
| 3 | * found in the LICENSE file. |
| 4 | * |
| 5 | * Some utility functions for use with RSA signature verification. |
| 6 | */ |
| 7 | |
| 8 | #ifndef VBOOT_REFERENCE_RSA_UTILITY_H_ |
| 9 | #define VBOOT_REFERENCE_RSA_UTILITY_H_ |
| 10 | |
| 11 | #include "rsa.h" |
| 12 | |
| 13 | /* Returns the size of a pre-processed RSA public key in bytes with algorithm |
| 14 | * [algorithm]. */ |
| 15 | int RSAProcessedKeySize(int algorithm); |
| 16 | |
| 17 | /* Create a RSAPublic key structure from binary blob [buf] of length |
| 18 | * [len]. */ |
| 19 | RSAPublicKey* RSAPublicKeyFromBuf(uint8_t* buf, int len); |
| 20 | |
| 21 | #endif /* VBOOT_REFERENCE_RSA_UTILITY_H_ */ |