/*
 * RSA internal helpers
 *
 * Copyright (c) 2015, Intel Corporation
 * Authors: Tadeusz Struk <tadeusz.struk@intel.com>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 */
#ifndef _RSA_HELPER_
#define _RSA_HELPER_
#include <linux/types.h>

/**
 * rsa_key - RSA key structure
 * @n           : RSA modulus raw byte stream
 * @e           : RSA public exponent raw byte stream
 * @d           : RSA private exponent raw byte stream
 * @p           : RSA prime factor p of n raw byte stream
 * @q           : RSA prime factor q of n raw byte stream
 * @dp          : RSA exponent d mod (p - 1) raw byte stream
 * @dq          : RSA exponent d mod (q - 1) raw byte stream
 * @qinv        : RSA CRT coefficient q^(-1) mod p raw byte stream
 * @n_sz        : length in bytes of RSA modulus n
 * @e_sz        : length in bytes of RSA public exponent
 * @d_sz        : length in bytes of RSA private exponent
 * @p_sz        : length in bytes of p field
 * @q_sz        : length in bytes of q field
 * @dp_sz       : length in bytes of dp field
 * @dq_sz       : length in bytes of dq field
 * @qinv_sz     : length in bytes of qinv field
 */
struct rsa_key {
	const u8 *n;
	const u8 *e;
	const u8 *d;
	const u8 *p;
	const u8 *q;
	const u8 *dp;
	const u8 *dq;
	const u8 *qinv;
	size_t n_sz;
	size_t e_sz;
	size_t d_sz;
	size_t p_sz;
	size_t q_sz;
	size_t dp_sz;
	size_t dq_sz;
	size_t qinv_sz;
};

int rsa_parse_pub_key(struct rsa_key *rsa_key, const void *key,
		      unsigned int key_len);

int rsa_parse_priv_key(struct rsa_key *rsa_key, const void *key,
		       unsigned int key_len);

extern struct crypto_template rsa_pkcs1pad_tmpl;
#endif
sb/storage/protocol.h?id=d0e287a401d9acf67b75180b26e2d62b7d482652'>tree</a><a class='active' href='/cgit.cgi/linux/net-next.git/commit/drivers/usb/storage/protocol.h?id=d0e287a401d9acf67b75180b26e2d62b7d482652'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/drivers/usb/storage/protocol.h?id=d0e287a401d9acf67b75180b26e2d62b7d482652'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/drivers/usb/storage/protocol.h'>
<input type='hidden' name='id' value='d0e287a401d9acf67b75180b26e2d62b7d482652'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/commit/?id=d0e287a401d9acf67b75180b26e2d62b7d482652'>root</a>/<a href='/cgit.cgi/linux/net-next.git/commit/drivers?id=d0e287a401d9acf67b75180b26e2d62b7d482652'>drivers</a>/<a href='/cgit.cgi/linux/net-next.git/commit/drivers/usb?id=d0e287a401d9acf67b75180b26e2d62b7d482652'>usb</a>/<a href='/cgit.cgi/linux/net-next.git/commit/drivers/usb/storage?id=d0e287a401d9acf67b75180b26e2d62b7d482652'>storage</a>/<a href='/cgit.cgi/linux/net-next.git/commit/drivers/usb/storage/protocol.h?id=d0e287a401d9acf67b75180b26e2d62b7d482652'>protocol.h</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='id' value='d0e287a401d9acf67b75180b26e2d62b7d482652'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><table summary='commit info' class='commit-info'>
<tr><th>author</th><td>Rask Ingemann Lambertsen &lt;rask@formelder.dk&gt;</td><td class='right'>2017-01-21 17:11:43 +0100</td></tr>
<tr><th>committer</th><td>Mark Brown &lt;broonie@kernel.org&gt;</td><td class='right'>2017-01-23 18:10:05 +0000</td></tr>
<tr><th>commit</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/drivers/usb/storage/protocol.h?id=d0e287a401d9acf67b75180b26e2d62b7d482652'>d0e287a401d9acf67b75180b26e2d62b7d482652</a> (<a href='/cgit.cgi/linux/net-next.git/patch/drivers/usb/storage/protocol.h?id=d0e287a401d9acf67b75180b26e2d62b7d482652'>patch</a>)</td></tr>
<tr><th>tree</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/tree/?id=d0e287a401d9acf67b75180b26e2d62b7d482652'>f1ba3cd0583e38846c4f6e32eee74a25a2739a31</a> /<a href='/cgit.cgi/linux/net-next.git/tree/drivers/usb/storage/protocol.h?id=d0e287a401d9acf67b75180b26e2d62b7d482652'>drivers/usb/storage/protocol.h</a></td></tr>
<tr><th>parent</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/drivers/usb/storage/protocol.h?id=d00b74613fb18dfd0a5aa99270ee2e72d5c808d7'>d00b74613fb18dfd0a5aa99270ee2e72d5c808d7</a> (<a href='/cgit.cgi/linux/net-next.git/diff/drivers/usb/storage/protocol.h?id=d0e287a401d9acf67b75180b26e2d62b7d482652&amp;id2=d00b74613fb18dfd0a5aa99270ee2e72d5c808d7'>diff</a>)</td></tr></table>
<div class='commit-subject'>regulator: axp20x: AXP806: Fix dcdcb being set instead of dcdce</div><div class='commit-msg'>A typo or copy-paste bug means that the register access intended for
regulator dcdce goes to dcdcb instead. This patch corrects it.

Fixes: 2ca342d391e3 (regulator: axp20x: Support AXP806 variant)
Signed-off-by: Rask Ingemann Lambertsen &lt;rask@formelder.dk&gt;
Acked-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: stable@vger.kernel.org
</div><div class='diffstat-header'><a href='/cgit.cgi/linux/net-next.git/diff/?id=d0e287a401d9acf67b75180b26e2d62b7d482652'>Diffstat</a> (limited to 'drivers/usb/storage/protocol.h')</div><table summary='diffstat' class='diffstat'>