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

  • CFTC Chairman: Expected to Continue to Crack Down on More Cryptocurrency Companies

    Rostin Behnam, the chairman of the US Commodity Futures Trading Commission (CFTC), expects that as long as there is investor interest in the market, the regulatory agency will continue to crack down on cryptocurrency companies to protect investors from potential fraud and manipulation.

  • Farcaster's social client Kiosk completes $10 million financing, led by Electric Capital

    Farcaster's integrated social client Kiosk has announced the completion of a $10 million financing round on the X platform, led by Electric Capital, with participation from a16z Crypto, USV, and Variant Fund. Kiosk aims to promote community building and commerce within applications, enabling creators to establish communities, share rich media content, mint NFTs, interact with like-minded individuals, and seamlessly customize channel economics, while emphasizing the integration of on-chain assets into social interactions and envisioning a more inclusive and interconnected Web3 experience.

  • A whale sold 224 WBTC worth $14.4 million in the past three hours

    According to on-chain analyst @ai_9684xtpa, address 0x486...1505e sold 224 WBTC tokens worth $14.4 million through Cowswap in the past three hours, making a profit of $830,000 (selling at an average price of $64,203). The seller had bought 371 WBTC tokens at an average price of $60,504 between November 2023 and April 2024, and still holds 280 WBTC tokens.

  • CryptoQuant CEO: BTC needs to remain above $80,000 for miners to remain profitable after halving

    Bitcoin mining revenue significantly decreased in May due to the impact of the fourth Bitcoin halving event. On May 1st, the total revenue from block rewards and transaction fees reached a new low of only $26.3 million.CryptoQuant CEO Ki Young Ju calculated that, based on current conditions, Bitcoin needs to stay above $80,000 for miners to remain profitable after the halving. However, most miners have taken proactive measures to upgrade their mining equipment to lower long-term operating costs and remain competitive.

  • BTC returns to above 65,000 USDT, up 2.08% in 24 hours

    OKX market shows that BTC has returned to above 65000 USDT, now reporting 65102 USDT, with a 24-hour increase of 2.08%.

  • Hundre Finance attackers have withdrawn 162.2 ETH worth of crypto assets from Curve

    According to PeckShield monitoring, the attacker of Hundre Finance withdrew 784,000 3Crv from Curve and exchanged it for 273 ETH. In addition, they also exchanged 305.6 WOO, 39 PAXG, 200,000 FRAX, and 100,000 DAI, totaling 162.2 ETH. The attacker then bridged 1,034 ETH (2.17 million USD), 842.8K DAI, 1.11 million USDT, 1.27 million USDC, and 457.3 FRAX from Optimism to Ethereum. They also exchanged a total of 480,000 USDC for 142.6 WETH, 306 WOO, and 39 PAXG. They also exchanged 1.11 million USDT for 500.3 thousand USD worth of DAI and 613.8 thousand USD worth of FRAX. Additionally, on April 15, 2023, approximately 786,000 USD worth of USDC was added to Curve3Pool.

  • LayerZero co-founder: "Self-reporting of witch activities" is not aimed at individuals, but at industrial witch studios

    Bryan Pellegrino, co-founder and CEO of LayerZero, stated on social media that the "Self-Report Sybil Activity" is not targeting individual users, but rather large industrial witch farms (studios).Earlier, LayerZero Labs launched the "Self-Report Sybil Activity" plan, which allows witch addresses to self-report related addresses on a designated page and receive an expected allocation of 15%, without answering any questions. The deadline is May 17th, 19:59:59.

  • Argentina’s House of Representatives Passes Bill to Regularize Cryptocurrency Taxation

    The Argentine Chamber of Deputies has passed a cryptocurrency tax normalization bill aimed at advancing a series of important government reforms. The bill introduces the possibility of regularizing previously undeclared cryptocurrency assets, up to a maximum of $100,000, without paying government collection fees. However, if the value of cryptocurrency assets exceeds this limit, the government will apply preferential tax rates based on the taxpayer's declaration date.

  • GNUS on Fantom was attacked, with a loss of about $1.27 million

    According to Beosin's monitoring, GNUS on Fantom was attacked, resulting in a loss of approximately $1.27 million. GNUS stated on the X platform that due to recent vulnerabilities, hackers were able to mint fake GNUS tokens on Fantom, transfer them to Ethereum and Polygon through the Axelar Bridge, and sell them to existing liquidity pools. We will take a snapshot of the blocks before the exploit. To ensure fairness, please do not purchase GNUS tokens after the exploit, as we will issue new tokens.

  • Pandu Financial Group received the first round of strategic equity investment of tens of millions of Hong Kong dollars, led by Longling Capital

    Pando Financial Group announced it has received tens of millions of Hong Kong dollars in strategic equity investment led by Longling Investment. Pando Financial Group stated that it plans to use the newly injected funds for key growth areas, including market expansion, innovative product development, key talent recruitment, and technology upgrades, aiming to accelerate the layout of opportunities in the era of virtual assets through these strategic initiatives. Currently, the group's asset management scale has reached $500 million. Pando Asset, a subsidiary of Pando Financial Group, established its headquarters in Zurich in 2022 and issued the Pando 6 spot virtual asset fund (Bitcoin/Ethereum spot ETPs) on the Swiss Exchange. Another subsidiary of Pando Financial Group, Pando Limited, obtained licenses from the Securities and Futures Commission in Hong Kong, including Type 1 (securities trading), Type 4 (advising on securities), and Type 9 (asset management), as well as public fund qualifications, and was approved to manage investment portfolios with more than 10% invested in virtual assets and issued several excellent performance actively managed ETF products.