TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How is encryption implemented?

1 点作者 gymshoes超过 6 年前
I&#x27;ve read that best practices of generating keys with encryption is to use the API provided by the platform.<p>What exactly happens under that API? How is the algorithm that does the encryption actually hidden?

1 comment

rococode超过 6 年前
The reason for using the API is not to &quot;hide&quot; the algorithm, but to prevent mistakes.<p>If you make a mistake in implementing or using an encryption algorithm, it may be easily broken. Encryption algorithms are relatively complex to implement, so it&#x27;s safer to go with a tried-and-tested implementation in the form of an established API.<p>Good encryption algorithms are all designed with the expectation that the algorithm will be widely known. The security is provided in a different way, through the expectation that only one entity holds the key that unlocks the encrypted data and that the algorithm will prevent anyone who doesn&#x27;t hold the key from being able to unencrypt the data anyways.