Message ID | 20190918220140.838-2-rasmus.villemoes@prevas.dk |
---|---|
State | RFC |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=prevas.se header.i=@prevas.se header.b="VloIgzXT"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46Yr784K5Cz9sPD for <incoming@patchwork.ozlabs.org>; Thu, 19 Sep 2019 18:46:44 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 6007AC22171; Thu, 19 Sep 2019 07:27:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 09275C22175; Thu, 19 Sep 2019 07:27:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 65F1CC22165; Thu, 19 Sep 2019 07:27:26 +0000 (UTC) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140105.outbound.protection.outlook.com [40.107.14.105]) by lists.denx.de (Postfix) with ESMTPS id 4589EC22161 for <u-boot@lists.denx.de>; Thu, 19 Sep 2019 07:27:24 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MzPrIZwkCO/QSMVCB1cmqh2IZ7mwtoJcrDwPm5WM3NemxdEHmkFv0+oDqNzf40WOEx02+hJKnW+i5+zQGAZX400VkPt7KFi5F0AzPt4jnAxNKU9P6FcxP9MamxNbleSUl8r+l8js3U7UIV3XuGbZca+azEcrVXN3P74yVfqY7bURu/JiIZFU/ip/BRVo4T0NRhBY738ItQUT49gZ5FQs5rchmlHPGmnjFKe4iFgJZoqfsBazPXwq1R498T8vXikNNrMpjnFZG9uVra653Rb2+UJCPTbbnhYQbsXRSE3qtf0HSzmjNYu9s5mulrDWvEp/BruGIUVBiueHatB0d7Y+6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qnJkPofISt7y+7AKWqy8KLNprmAhn4WUBelGhWIdT1k=; b=IVb+wWGXsOx7XUf/uBBAfyne/JCCqtCIQHNP7vm/t0vs/XkrJA7KpkHi+5ZVdTs8RlXsluPIkT0sWWvASjiaGuT7rf4Jswy3rh0jzaRKRFtoEff0on7Mz6OgpqVg7djrMdyI4nUqpPBfYPgjpHuug53ub/6gJdwQ4qlE9GPY4xHH+R0p38rv3mBw6J+tYfhBb5W6Oxdiv+2iMEJ5kI283ZpRc8vk6jWtUAMFjjFsC0qNasQZCnx2L13A7RrkwBFarMYH3FwntKCiA4C1Fn7NkfD4LIrgD8GRwDetPSUo3g/oje8UH9loAL4jpjH8j2v6dEDSGlWR7OkPtfHSWIx23A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.se; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.se; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qnJkPofISt7y+7AKWqy8KLNprmAhn4WUBelGhWIdT1k=; b=VloIgzXTrqhn6u2/Nb55FHdHnRKX/sY/17dKZypkYTH4Fdd6VLNL5kpISTZp4suNblaetr5+/+XkhyN/exraVrrz7xWg85O9ZMdx5Cxr8nh21Gtb0CxXeIZfgiDgb8vrLTUo/p3jEZd3oCzG2tv5E5lIwmohS1Ow4F2+oyVRyvw= Received: from DB8PR10MB3483.EURPRD10.PROD.OUTLOOK.COM (10.186.164.147) by DB8PR10MB3083.EURPRD10.PROD.OUTLOOK.COM (10.255.17.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.26; Wed, 18 Sep 2019 22:01:52 +0000 Received: from DB8PR10MB3483.EURPRD10.PROD.OUTLOOK.COM ([fe80::95cb:8839:7c7c:efb8]) by DB8PR10MB3483.EURPRD10.PROD.OUTLOOK.COM ([fe80::95cb:8839:7c7c:efb8%2]) with mapi id 15.20.2263.023; Wed, 18 Sep 2019 22:01:52 +0000 From: Rasmus Villemoes <rasmus.villemoes@prevas.dk> To: "u-boot@lists.denx.de" <u-boot@lists.denx.de> Thread-Topic: [RFC PATCH 1/3] u-boot/sha256.h: add SHA256_INIT macro Thread-Index: AQHVbmytajbhUl2cIkin2kYuhhMGPg== Date: Wed, 18 Sep 2019 22:01:52 +0000 Message-ID: <20190918220140.838-2-rasmus.villemoes@prevas.dk> References: <20190918220140.838-1-rasmus.villemoes@prevas.dk> In-Reply-To: <20190918220140.838-1-rasmus.villemoes@prevas.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1PR0102CA0063.eurprd01.prod.exchangelabs.com (2603:10a6:7:7d::40) To DB8PR10MB3483.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:133::19) x-mailer: git-send-email 2.20.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=Rasmus.Villemoes@prevas.se; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [5.186.115.35] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b84f4d8c-1696-477e-9342-08d73c83cfd6 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:DB8PR10MB3083; x-ms-traffictypediagnostic: DB8PR10MB3083: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: <DB8PR10MB30838B991AEF581846879E318A8E0@DB8PR10MB3083.EURPRD10.PROD.OUTLOOK.COM> x-ms-oob-tlc-oobclassifiers: OLM:238; x-forefront-prvs: 01644DCF4A x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(376002)(366004)(136003)(396003)(39850400004)(199004)(189003)(6916009)(5660300002)(11346002)(476003)(478600001)(66066001)(4744005)(26005)(386003)(52116002)(76176011)(446003)(4326008)(2501003)(71200400001)(1076003)(305945005)(71190400001)(6486002)(2616005)(99286004)(186003)(6436002)(44832011)(486006)(81156014)(14454004)(5640700003)(8976002)(25786009)(42882007)(316002)(3846002)(6116002)(6506007)(102836004)(8676002)(66556008)(66446008)(66476007)(6512007)(64756008)(50226002)(256004)(2906002)(2351001)(7736002)(81166006)(8936002)(54906003)(36756003)(66946007)(107886003); DIR:OUT; SFP:1102; SCL:1; SRVR:DB8PR10MB3083; H:DB8PR10MB3483.EURPRD10.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: prevas.se does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Uqw7XP9vO3mP4sFX/UBll9W3tUjkxfqnFH61usfLoi/ElC0LxdO51N6jYEzoNpipwmO6yZLrypGzgo4jti+h5sZBRUfoXyLR2BAXazrOxySUvzvOW/Jij91+tDXkPmU8E/P3sSNAmE3jH43KnPG+NlImfH4C6FFbISAwXM7K1SAq3t9rZJXXkTIiIHC4VjnEVlAaoS5nKHKrmPUG21QobyGNZJnBulTeVz1GZDfYhxheTs5NWjApzu0CRHIXzIsJYic6v+euoPt1WJOCAUnC3egAviF7roP9lwZc32GzWI4pzoPOsUgk1o9lYziqPNePiZ5PtkAJXa63uka10u8tCFINXhLXHtv4JXhH84IbBh3BQj1RmNueRWU8cvuPlddDtOXLmULMKwehHjjLhuSsTcIvmkTTWAUbg3uY21TLTUw= MIME-Version: 1.0 X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: b84f4d8c-1696-477e-9342-08d73c83cfd6 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Sep 2019 22:01:52.4245 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: yXnZiD9kji/Zsx7CGQjY7RNSBYOdVTAR6sT4Ozw1O8mFxZ4A9q2L8N9nl7wedK0z5muCbi5geRh8lMhO4HuGqaUuMmJQYqspIvB7bYdnzm8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR10MB3083 Cc: Rasmus Villemoes <Rasmus.Villemoes@prevas.se>, Tom Rini <trini@konsulko.com> Subject: [U-Boot] [RFC PATCH 1/3] u-boot/sha256.h: add SHA256_INIT macro X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
collect entropy, populate /chosen/rng-seed
|
expand
|
diff --git a/include/u-boot/sha256.h b/include/u-boot/sha256.h index 9aa1251789..10f42091ee 100644 --- a/include/u-boot/sha256.h +++ b/include/u-boot/sha256.h @@ -22,4 +22,15 @@ void sha256_finish(sha256_context * ctx, uint8_t digest[SHA256_SUM_LEN]); void sha256_csum_wd(const unsigned char *input, unsigned int ilen, unsigned char *output, unsigned int chunk_sz); +#define SHA256_INIT { \ + .state[0] = 0x6A09E667, \ + .state[1] = 0xBB67AE85, \ + .state[2] = 0x3C6EF372, \ + .state[3] = 0xA54FF53A, \ + .state[4] = 0x510E527F, \ + .state[5] = 0x9B05688C, \ + .state[6] = 0x1F83D9AB, \ + .state[7] = 0x5BE0CD19, \ + } + #endif /* _SHA256_H */
To be used for statically initializing a sha256 context. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> --- include/u-boot/sha256.h | 11 +++++++++++ 1 file changed, 11 insertions(+)