Cointime

Download App
iOS & Android

Single-Tenant or Multi-Tenant HSMs? Do You Trust Your Cloud Provider Not To Peek At Your Keys?

Validated Individual Expert

Your encryption keys are your crown jewels. Lose or compromise them, and you are likely to have significant costs. In fact, a breach of a trust infrastructure has been assessed as the most costly of all cybersecurity attacks.

And, so, we are increasingly moving our data infrastructures from on-premise to the public key. So where should we store our encryption keys? Well, it all depends on which level of FIPS 140–2 you need to comply with.

For AWS, we can use an HSM (Hardware Security Module) to store our private and symmetric keys, but this is a multi-tenant system, and where you share the HSM with others. There should be no way that other AWS customers can have access to your keys, but there is the opportunity for AWS to access them. This is FIPS 140–2 Level 2.

For FIPS 140–2 Level 3, we have separation from other users and from AWS, and where we run a CloudHSM. This is much more costly and starts at around $1.45/hr to run in AWS (as compared to around $1/month for using a key in the HSM).

FIPS 140 levels

In 2019, FIPS 140–3 replaced FIPS 140–2. It defines 11 areas of design involved in designing and implementing modules [here][docs]. This includes four security levels for the cryptographic module specification; cryptographic module interfaces; roles, services, and authentication; software/firmware security; operating environment; physical security; non-invasive security; sensitive security parameter management; self-tests; life-cycle assurance; and mitigation of other attacks. Each layer builds on the previous level, and where Level 1 is the lowest level, and Level 4 provides the highest level. For those working in finance and in high-risk areas, Level 3 is often the benchmark, while in defence-related areas, Level 4 would often be applied. Table 1 outlines the differences between the levels.

Table 1: FIPS 140–3 overview

Physical security

For physical security, the tamper-proof nature of the target system is key, and where tamper detection becomes important at the higher levels of security.

Security levels

As Figure 1 illustrates, Level 1 provides a minimum security level, while Level 2 implements methods around role-based authentication, and also integrates physical tamper evidence. As we move up to Level 3, we integrate identity-based authentication and also have an isolation barrier between the identity system and the place where the keys are stored. This would integrate a secure enclave (such as with the Apple T2 chip), or a hardware security module (HSM).

For Level 4, we see formal models, detailed explanations, and pre/post conditions. It also contains a great integration of tamper detection, with EFP (Environmental Failure Protection) and EFT (Environmental Failure Testing). This would involve testing where other components around the target system were to fail, and for the target to not be compromised. A typical focus is around side channels, such as for radio frequency (RF) or electromagnetic (EM) radiation from devices.

Figure 1: FIP 140 levels

Isolation

For isolation, a method often used is key wrapping, and where a key is protected outside a trusted environment. Within the Cloud, AWS CloudHSM (hardware security module) supports AES key wrapping with the default initialization vector — 0xA6A6A6A6A6A6A6A6- or a user-defined value. This provides a FIPS 140–2 Level 3 environment and where the keys in their raw form are only handled within a trusted cloud instance. The wrapped keys can then exist outside this but only be converted into their actual form within the CloudHSM. A key generated within the CloudHSM can then be wrapped for export from the environment, or imported from an external wrapped key. The AWS CLI is on the form which defines a key handle (with -k) and the wrapping key handle (with -w):

> wrapKey -k 7 -w 14 -out mykey.key -m 5Key Wrapped.Wrapped Key written to file "mykey.key: length 612Cfm2WrapKey returned: 0x00 : HSM Return: SUCCESS

Conclusions

And, so, you need to decide whether you want to share your HSM with others, or run your own. Basically, it typically comes down to the level of FIP 140–2 we want to comply with. Level 3 is much better than Level 2, but you might struggle a bit in getting all our Cloud services to integrate with it, so often it is a balance between the two.

https://billatnapier.medium.com/single-tenant-or-multi-tenant-hsms-do-you-trust-your-cloud-provider-or-not-to-peek-at-your-keys-da28831a5217

Comments

All Comments

Recommended for you

  • Blast DEX Thruster receives $7.5 million in seed round funding

    The decentralized trading protocol Thruster based on Blast raised $7.5 million in seed funding led by Pantera Capital, bringing Thruster's valuation to $70 million. Angel investors include Santiago Santos, Frax founder Sam Kazemian, Pendle founder TN Lee, Stacked founder Alex Lin, Renzo founder Kratik Lodha, and Axelar founder Georgios Vlachos also participated in this round of funding.

  • Hong Kong Treasury Secretary: Will submit a draft bill on stablecoin and virtual asset over-the-counter trading services to the Legislative Council

    According to a report by Caixin, Hong Kong Financial Secretary Paul Chan Mo-po introduced the expenditure budget and work focus for the fiscal year 2024-25, stating that a variety of central bank digital currency cross-border networks (mBridge) are expected to be launched this year, with the first phase of services focusing on settling cross-border transactions for enterprises using various central bank digital currencies. In addition, the "digital renminbi" will also expand its pilot scope in Hong Kong, further improving cross-border payment efficiency and user experience. In terms of virtual assets, the government is promoting a series of measures to strengthen regulation and promote the stable and responsible development of the virtual asset market in Hong Kong. Specifically, the Hong Kong Monetary Authority launched a stablecoin sandbox in March this year, allowing institutions interested in issuing stablecoins to conduct testing within a controlled range. The government has also consulted the public on the regulation of fiat-backed stablecoin issuers and virtual asset over-the-counter trading services, and is considering the feedback received. Depending on the progress of preparatory work, the draft legislation will be submitted to the Legislative Council as soon as possible.

  • Three men and women arrested for laundering more than 1.8 billion yuan from virtual currency trading platforms and bank accounts

    Hong Kong Customs broke up a money laundering syndicate and arrested three local suspects who are suspected of using virtual currency trading platforms and multiple local bank accounts opened by companies to process over 1.8 billion yuan of funds with unknown sources. Customs officials targeted the three suspects based on intelligence and launched a wealth investigation, discovering that the three individuals conducted over 1,000 suspicious transactions between June 2021 and July 2022 through the opening of multiple local companies and bank accounts, including the transfer of funds from virtual currency trading platforms, involving more than 1.8 billion yuan.

  • BTC halving countdown only 1 day left

    According to Ouke Cloud Chain data, there is only 1 day and 17 hours left until the BTC halving countdown, which is expected to occur on 2024/04/20. The current block reward is 6.25 BTC, and after the halving, the block reward will be 3.125 BTC. There are currently 253 remaining blocks, the current network hashrate is 587.96 EH/s, the network mining difficulty is 83.95 T, and the average block time is 9.94 min.

  • The total open interest of BTC options is $21.24 billion, and the open interest of ETH options is $9.42 billion.

    According to Coinglass data, the nominal value of open BTC option positions on the entire network is $21.24 billion, and the nominal value of open ETH option positions is $9.42 billion.

  • CZ launches testnet course on Giggle Academy

    CZ, the former CEO of Binance, announced the test network course of the recently launched education project Giggle Academy. CZ shared a video clip on his X account, which involved a course in an installable Android software package (Apk).

  • After the Bitcoin halving, new mining output will be reduced from 900 to 450 per day

    According to HODL15Capital's monitoring, after the halving of Bitcoin, its newly mined output will be reduced from 900 coins per day to 450 coins per day. Based on the current price, purchasing all of these new outputs would cost approximately $28 million.

  • BTC breaks through $62,000, and the intraday decline narrows to 2.96%

    According to market data, BTC has broken through $62,000 and is currently trading at $62,008.36. The intraday decline has narrowed to 2.96%, and the market is experiencing large fluctuations, so please be prepared for risk control.

  • Tether issued USDT worth $437 million yesterday

    Tether issued $437 million worth of USDT on April 17 and redeemed $142 million worth of USDT (a net increase of 295 million USDT in circulation). Approximately $100 million worth of USDT was issued to an address starting with 0x5c (suspected to be a Bitfinex forwarding address), and approximately $81 million worth of USDT was issued to an address starting with 0x77 (suspected to be Bitfinex wallet address 1).

  • Ordinals founder confirms that the Runes protocol only hard-codes rune number 0

    On April 18th, Casey Rodarmor, the founder of Ordinals, stated during a Discord community meeting that the Runes protocol only hardcodes the 0th rune, which is "UNCOMMON•GOODS". The other nine token names are not hardcoded into the Runes protocol due to a lack of good ideas. According to Casey's previous plan, the Runes protocol will hardcode the first 10 runes, which are numbered 0-9.