CN117411681A - 一种基于tee的密码软键盘输入方法 - Google Patents
一种基于tee的密码软键盘输入方法 Download PDFInfo
- Publication number
- CN117411681A CN117411681A CN202311327166.XA CN202311327166A CN117411681A CN 117411681 A CN117411681 A CN 117411681A CN 202311327166 A CN202311327166 A CN 202311327166A CN 117411681 A CN117411681 A CN 117411681A
- Authority
- CN
- China
- Prior art keywords
- password
- soft keyboard
- data
- input
- tee
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 13
- 238000002955 isolation Methods 0.000 abstract description 5
- 230000006870 function Effects 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000013475 authorization Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/02—Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/70—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
- G06F21/82—Protecting input, output or interconnection devices
- G06F21/83—Protecting input, output or interconnection devices input devices, e.g. keyboards, mice or controllers thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0489—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using dedicated keyboard keys or combinations thereof
- G06F3/04897—Special input arrangements or commands for improving display capability
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/083—Network architectures or network communication protocols for network security for authentication of entities using passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0819—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0866—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving user or device identifiers, e.g. serial number, physical or biometrical information, DNA, hand-signature or measurable physical characteristics
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0877—Generation of secret information including derivation or calculation of cryptographic keys or passwords using additional device, e.g. trusted platform module [TPM], smartcard, USB or hardware security module [HSM]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3226—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using a predetermined code, e.g. password, passphrase or PIN
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/12—Details relating to cryptographic hardware or logic circuitry
- H04L2209/127—Trusted platform modules [TPM]
Abstract
本发明公开的一种基于TEE的密码软键盘输入方法,其利用了TEE环境与REE环境安全隔离的特性,为用户提供安全的输入环境,并使用密码算法对用户输入的数据进行加密,加密数据到服务端后,由服务端向安全密码软键盘服务端兑换原文,保证在非安全环境下用户的输入数据永远是密文,这样为用户提供绝对安全的输入环境以及保障输入数据的绝对安全。
Description
技术领域
本发明涉及计算机信息安全技术领域,尤其涉及一种基于TEE的密码软键盘输入方法。
背景技术
随着社会的发展,电脑、手机、平板、自动取款机、自助售货机等各类电子设备成为了社会生活的必需品,这些设备在人机交互的过程中,有各式各样的输入场景需要用到软键盘。要输入的信息不乏如密码口令、认证信息、身份信息等的安全信息,这类信息一旦泄露,后果不堪设想。
因此,迫切需要一种技术方案来实现安全输入和输入信息保护,基于这一现状,相关厂商也推出了自己的安全软键盘产品。这些产品的实现方案可以总结为以下两点:
一、对用户输入进行保护
在用户输入信息时,安全软键盘会使用多个随机生成的输入框,使得用户输入的数据难以被破解。基于加密和伪造数据的规则,使得键盘记录程序难以拦截输入数据。
二、对输入数据进行加密
在安全软键盘上输入的数据会被加密,这是通过将用户输入转换成一组密文字符来实现的,这些字符是基于RSA加密算法和256位AES加密算法生成的。此过程可确保数据在传输过程中始终保持加密状态,从而避免被黑客截获和破译。
上述的安全软键盘虽然在一定程度上提高了安全性,但仍然存在一些缺点或不足:
一、无法防御hook攻击
可通过hook技术对底层api进行劫持,从而获得用户的输入数据。
二、无法防御针对内存的攻击
可通过针对内存空间的攻击,例如缓冲区溢出攻击,来获得内存中用户输入的数据。
为此,本申请人经过有益的探索和研究,找到了解决上述问题的方法,下面将要介绍的技术方案便是在这种背景下产生的。
发明内容
本发明所要解决的技术问题在于:针对现有技术的不足而提供一种基于TEE的密码软键盘输入方法,旨在为用户提供绝对安全的输入环境以及保障输入数据的绝对安全。
本发明所要解决的技术问题可以采用如下技术方案来实现:
一种基于TEE的密码软键盘输入方法,包括以下步骤:
步骤S10,运行于终端设备上的应用程序调用安全密码软键盘SDK发出拉起安全密码软键盘接口;
步骤S20,所述安全密码软件键盘SDK根据所述应用程序的调用指令向密码安全软键盘程序发送拉起键盘指令;
步骤S30,当密码安全软键盘拉起后,所述密码安全软键盘程序获取用户在密码安全软键盘上输入的密码信息,并采用会话密钥对输入的密码信息进行加密处理,以形成密文数据;
步骤S40,所述密码安全软键盘程序将所述密文数据返回至所述安全密码软键盘SDK,所述安全密码软键盘SDK将所述密文数据和会话密钥ID作为软键盘输入数据返回至所述应用程序;
步骤S50,所述应用程序将所述密文数据和会话密钥ID提交至应用服务端,所述应用服务端调用安全密钥软键盘服务端的解密数据接口通过所述会话密钥ID对所述密文数据进行解密处理,以形成密码数据原文,再将密码数据原文返回至所述应用服务端;
步骤S60,所述应用服务端根据所述密码数据原文执行业务逻辑,并将业务执行结果返回至所述应用程序。
由于采用了如上技术方案,本发明的有益效果在于:本发明利用了TEE环境与REE环境安全隔离的特性,为用户提供安全的输入环境,并使用密码算法对用户输入的数据进行加密,加密数据到服务端后,由服务端向安全密码软键盘服务端兑换原文,保证在非安全环境下用户的输入数据永远是密文,这样为用户提供绝对安全的输入环境以及保障输入数据的绝对安全。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明的基于TEE的密码软键盘输入方法所基于的系统的结构示意图。
图2是本发明的基于TEE的密码软键盘输入方法的流程图。
具体实施方式
为了使本发明实现的技术手段、创作特征、达成目的与功效易于明白了解,下面结合具体图示,进一步阐述本发明。
TEE环境是基于TrustZone技术提供可信执行环境,TrustZone技术将中央处理器的工作状态划分为正常模式和安全模式,富执行环境(Rich Execution Environment,REE)运行在正常模式下,TEE运行在安全模式下。在安全模式下,提供了对外围硬件资源的保护和隔离,包括内存、外设等,保障REE和TEE的隔离,保障TEE的安全性。
本发明的核心是利用了TEE环境与REE环境安全隔离的特性,为用户提供安全的输入环境,并使用密码算法(支持国密算法,也支持国际算法)对用户输入的数据进行加密,加密数据到服务端后,由服务端向安全密码软键盘服务端兑换原文,保证在非安全环境下用户的输入数据永远是密文。
本发明所基于的系统具有五个模块,分别为应用程序、应用服务端、安全密码软键盘SDK(CA)、安全密码软键盘程序(TA)以及安全密码软键盘服务端。参见图1,下面对这五个模块进行详细介绍:
一、应用程序
运行于终端设备上的应用程序,可以接入安全密码软键盘SDK(CA)。在需要安全输入的场景,调用安全密码软键盘SDK(CA)提供的接口,拉起软键盘,进行安全输入。输入完成后将密文数据提交到应用服务端,由应用服务端向安全密码软键盘服务端兑换明文使用。
二、应用服务端
对于安全输入的数据,应用程序会直接提交密文到应用服务端,应用服务端需要调用安全密码软键盘服务端提供的接口对密文进行解密,然后使用解密后的明文执行业务逻辑。
三、安全密码软键盘SDK(CA)
集成在应用程序中,提供拉起安全密码软键盘的接口,供应用调用。实现了与安全环境中的安全密码软键盘程序(TA)的交互,通过发送指令的方式调用安全密码软键盘程序(TA)中的功能,通过共享内存的方式与安全密码软键盘程序(TA)进行数据传递。
四、安全密码软键盘程序(TA)
内置在TEE环境中的TA程序,实现了软键盘输入、证书存储以及密码算法(支持国密算法,也支持国际算法)。收到安全密码软键盘SDK(CA)发送的指令后,拉起软键盘,用户输入完毕后,使用密码算法进行加密,并将密文通过共享内存的方式传递给安全密码软键盘SDK(CA)。
五、安全密码软键盘服务端
安全密码软件的服务端,单独部署以保证密钥的安全性。为安全密码软键盘SDK(CA)提供生成会话密钥功能,为应用服务端提供解密功能。
参见图2,图中给出的是本发明的基于TEE的密码软键盘输入方法,包括以下步骤:
步骤S10,运行于终端设备上的应用程序调用安全密码软键盘SDK发出拉起安全密码软键盘接口;
步骤S20,安全密码软件键盘SDK根据应用程序的调用指令向密码安全软键盘程序发送拉起键盘指令;
步骤S30,当密码安全软键盘拉起后,密码安全软键盘程序获取用户在密码安全软键盘上输入的密码信息,并采用会话密钥对输入的密码信息进行加密处理,以形成密文数据;
步骤S40,密码安全软键盘程序将密文数据返回至安全密码软键盘SDK,安全密码软键盘SDK将密文数据和会话密钥ID作为软键盘输入数据返回至应用程序;
步骤S50,应用程序将所述密文数据和会话密钥ID提交至应用服务端,应用服务端调用安全密钥软键盘服务端的解密数据接口通过会话密钥ID对密文数据进行解密处理,以形成密码数据原文,再将密码数据原文返回至应用服务端;
步骤S60,应用服务端根据密码数据原文执行业务逻辑,并将业务执行结果返回至应用程序。
本发明能够为用户提供绝对安全的输入环境以及保障输入数据的绝对安全,具体为以下几个方面:
一、密钥安全
本发明所采用的数字证书只存在于安全密码键盘的服务器和TEE中,都为出厂内置,且不公开,以此来保障密码运算时使用的密钥绝对安全。
二、加解密安全
证书的绝对安全一定程度保证了加解密的安全,在此基础上,本发明中加解密的密文和明文只会同时出现在安全密码键盘的服务器和TEE中,这两处几乎是绝对安全的,使得明文和密文不会同时出现在非安全环境中,保证了加解密不会被逆向分析。
三、数据安全
TEE中的安全密码键盘程序在对用户输入的原始数据加密时,会以一定规则插入应用信息、授权信息、时间戳等校验信息,然后将加密后的密文,返回给安全密码软键盘SDK。应用服务器中的明文是原始数据,密文对应的数据则是通过一定的规则插入了验证信息,解密后,验证信息会被去除,返回给应用服务器原始数据,仅有密文在非安全环境中传递,保证数据的绝对安全。
四、继承自TEE的安全特性
安全密码软键盘程序运行与TEE环境中,与REE环境完全隔离。针对REE环境的攻击手段,如页面劫持、hook攻击、内存攻击等等,都无法起作用。
以上显示和描述了本发明的基本原理和主要特征和本发明的优点。本行业的技术人员应该了解,本发明不受上述实施例的限制,上述实施例和说明书中描述的只是说明本发明的原理,在不脱离本发明精神和范围的前提下,本发明还会有各种变化和改进,这些变化和改进都落入要求保护的本发明范围内。本发明要求保护范围由所附的权利要求书及其等效物界定。
Claims (1)
1.一种基于TEE的密码软键盘输入方法,包括以下步骤:
步骤S10,运行于终端设备上的应用程序调用安全密码软键盘SDK发出拉起安全密码软键盘接口;
步骤S20,所述安全密码软件键盘SDK根据所述应用程序的调用指令向密码安全软键盘程序发送拉起键盘指令;
步骤S30,当密码安全软键盘拉起后,所述密码安全软键盘程序获取用户在密码安全软键盘上输入的密码信息,并采用会话密钥对输入的密码信息进行加密处理,以形成密文数据;
步骤S40,所述密码安全软键盘程序将所述密文数据返回至所述安全密码软键盘SDK,所述安全密码软键盘SDK将所述密文数据和会话密钥ID作为软键盘输入数据返回至所述应用程序;
步骤S50,所述应用程序将所述密文数据和会话密钥ID提交至应用服务端,所述应用服务端调用安全密钥软键盘服务端的解密数据接口通过所述会话密钥ID对所述密文数据进行解密处理,以形成密码数据原文,再将密码数据原文返回至所述应用服务端;
步骤S60,所述应用服务端根据所述密码数据原文执行业务逻辑,并将业务执行结果返回至所述应用程序。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311327166.XA CN117411681A (zh) | 2023-10-13 | 2023-10-13 | 一种基于tee的密码软键盘输入方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311327166.XA CN117411681A (zh) | 2023-10-13 | 2023-10-13 | 一种基于tee的密码软键盘输入方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117411681A true CN117411681A (zh) | 2024-01-16 |
Family
ID=89488165
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311327166.XA Pending CN117411681A (zh) | 2023-10-13 | 2023-10-13 | 一种基于tee的密码软键盘输入方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117411681A (zh) |
-
2023
- 2023-10-13 CN CN202311327166.XA patent/CN117411681A/zh active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10142107B2 (en) | Token binding using trust module protected keys | |
US11233653B2 (en) | Dongle for ciphering data | |
US8904195B1 (en) | Methods and systems for secure communications between client applications and secure elements in mobile devices | |
CN110059458B (zh) | 一种用户口令加密认证方法、装置及系统 | |
CN108718233B (zh) | 一种加密方法、计算机设备及存储介质 | |
CN110889696A (zh) | 一种基于sgx技术的联盟区块链秘钥存储方法、装置、设备及介质 | |
JP2012005129A (ja) | 通信データの保護方法、セキュリティ・システム | |
CN109684129B (zh) | 数据备份恢复方法、存储介质、加密机、客户端和服务器 | |
US20210334356A1 (en) | Authentication credential protection method and system | |
CN104270242A (zh) | 一种用于网络数据加密传输的加解密装置 | |
CN103378971A (zh) | 一种数据加密系统及方法 | |
CN110868291A (zh) | 一种数据加密传输方法、装置、系统及存储介质 | |
EP3739489B1 (en) | Devices and methods of managing data | |
US20210281399A1 (en) | Methods and systems of securely transferring data | |
WO2021018306A1 (zh) | 一种认证凭据保护方法和系统 | |
US20230327855A1 (en) | System and method for protecting secret data items using multiple tiers of encryption and secure element | |
CN116244750A (zh) | 一种涉密信息维护方法、装置、设备及存储介质 | |
CN115809459A (zh) | 软件密码模块的数据保护及解密方法、系统、设备及介质 | |
CN112149166B (zh) | 非常规密码保护方法及银行智能机器 | |
CN114282189A (zh) | 一种数据安全存储方法、系统、客户端以及服务器 | |
CN117411681A (zh) | 一种基于tee的密码软键盘输入方法 | |
CN111212068B (zh) | 一种输入法对文字加解密的方法 | |
CN109450899B (zh) | 密钥管理方法及装置、电子设备、存储介质 | |
CN102780812B (zh) | 一种利用移动终端实现安全输入的方法和系统 | |
JP2002247021A (ja) | アクセス制限付コンテンツ表示方法およびその装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |