TWI761243B - Encryption system and encryption method for group instant massaging - Google Patents

Encryption system and encryption method for group instant massaging Download PDF

Info

Publication number
TWI761243B
TWI761243B TW110123849A TW110123849A TWI761243B TW I761243 B TWI761243 B TW I761243B TW 110123849 A TW110123849 A TW 110123849A TW 110123849 A TW110123849 A TW 110123849A TW I761243 B TWI761243 B TW I761243B
Authority
TW
Taiwan
Prior art keywords
key
terminal device
group
message
server
Prior art date
Application number
TW110123849A
Other languages
Chinese (zh)
Other versions
TW202301830A (en
Inventor
吳治東
鄭維元
蘇嚮權
梁俊安
Original Assignee
中華電信股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 中華電信股份有限公司 filed Critical 中華電信股份有限公司
Priority to TW110123849A priority Critical patent/TWI761243B/en
Application granted granted Critical
Publication of TWI761243B publication Critical patent/TWI761243B/en
Publication of TW202301830A publication Critical patent/TW202301830A/en

Links

Images

Abstract

An encryption system and an encryption method for group instant messaging are provided. The encryption method includes: a first terminal generates a second group key, an ephemeral public key, and an ephemeral private key corresponding to the ephemeral public key based on ECC algorithm if a first group key is invalid; The first terminal generates a group key ciphertext according to the second group key, the ephemeral private key, and a second public key corresponding to a second terminal; in response to receiving the group key ciphertext, a server transmits key information corresponding to the second group key to the first terminal; in response to receiving the key information from the server, the first terminal updates a first member key corresponding to the first terminal according to the second group key; and the first terminal communicates with the second terminal according to the first member key.

Description

群組即時通訊的加密系統和加密方法Encryption system and encryption method for group instant messaging

本發明是有關於一種通訊技術,且特別是有關於一種群組即時通訊的加密系統和加密方法。The present invention relates to a communication technology, and in particular, to an encryption system and an encryption method for group instant communication.

以下為現行常見的群組即時通訊服務的加密方法:在每次發訊時隨機產生一組訊息金鑰,並透過非對稱式加密方式將金鑰同步至接收端,接收端即可透過個人的私鑰解密出訊息金鑰,並使用訊息金鑰解密訊息。然而,上述的方法對於減緩成員數量對效能的影響又能兼具安全性與可用性尚無一個完美的解決方案,仍然有改善空間。The following is the encryption method of the current common group instant messaging service: a set of message keys are randomly generated each time a message is sent, and the keys are synchronized to the receiving end through asymmetric encryption, and the receiving end can pass the personal The private key decrypts the message key and uses the message key to decrypt the message. However, the above-mentioned methods do not have a perfect solution for mitigating the impact of the number of members on performance and having both security and usability, and there is still room for improvement.

本發明提供一種群組即時通訊的加密系統和加密方法,可用於群組即時通訊服務。The present invention provides an encryption system and an encryption method for group instant messaging, which can be used for group instant messaging services.

本發明的一種群組即時通訊的加密系統,包含第一終端裝置、第二終端裝置以及伺服器。伺服器通訊連接至第一終端裝置以及第二終端裝置,其中伺服器傳送群組金鑰狀態至第一終端裝置;響應於群組金鑰狀態指示第一群組金鑰失效,第一終端裝置基於橢圓曲線密碼學演算法產生第二群組金鑰、臨時公鑰以及對應於臨時公鑰的臨時私鑰;第一終端裝置根據第二群組金鑰、臨時私鑰以及對應於第二終端裝置的第二公鑰產生群組金鑰密文;響應於自第一終端裝置接收群組金鑰密文,伺服器傳送對應於第二群組金鑰的金鑰資訊至第一終端裝置;響應於自伺服器接收金鑰資訊,第一終端裝置根據第二群組金鑰更新對應於第一終端裝置的第一成員金鑰;以及第一終端裝置根據第一成員金鑰與第二終端裝置進行通訊。An encryption system for group instant messaging of the present invention includes a first terminal device, a second terminal device and a server. The server is communicatively connected to the first terminal device and the second terminal device, wherein the server transmits the group key status to the first terminal device; in response to the group key status indicating that the first group key is invalid, the first terminal device The second group key, the temporary public key and the temporary private key corresponding to the temporary public key are generated based on the elliptic curve cryptography algorithm; the first terminal device is based on the second group key, the temporary private key and the temporary private key corresponding to the second terminal. the second public key of the device generates a group key ciphertext; in response to receiving the group key ciphertext from the first terminal device, the server transmits key information corresponding to the second group key to the first terminal device; In response to receiving the key information from the server, the first terminal device updates the first member key corresponding to the first terminal device according to the second group key; and the first terminal device communicates with the second terminal according to the first member key device to communicate.

在本發明的一實施例中,上述的第一終端裝置根據第二群組金鑰更新儲存在第一終端裝置且對應於第二終端裝置的第二成員金鑰;以及第一終端裝置自第二終端裝置接收加密訊息,並且通過第二成員金鑰解密加密訊息。In an embodiment of the present invention, the above-mentioned first terminal device updates a second member key stored in the first terminal device and corresponding to the second terminal device according to the second group key; The two terminal devices receive the encrypted message and decrypt the encrypted message through the second member key.

在本發明的一實施例中,上述的第一終端裝置根據第一成員金鑰產生加密訊息,並且傳送加密訊息至第二終端裝置。In an embodiment of the present invention, the above-mentioned first terminal device generates an encrypted message according to the first member key, and transmits the encrypted message to the second terminal device.

在本發明的一實施例中,上述的第一終端裝置基於橢圓曲線迪菲-赫爾曼密鑰交換演算法而根據臨時私鑰以及第二公鑰產生共享秘密;以及第一終端裝置基於對稱加密演算法而根據共享秘密以及第二群組金鑰產生群組金鑰密文。In an embodiment of the present invention, the above-mentioned first terminal device generates the shared secret according to the temporary private key and the second public key based on the elliptic curve Diffie-Hellman key exchange algorithm; and the first terminal device is based on the symmetric The encryption algorithm generates the group key ciphertext according to the shared secret and the second group key.

在本發明的一實施例中,在執行對稱加密演算法之前,第一終端裝置對共享秘密執行安全雜湊演算法。In an embodiment of the present invention, before executing the symmetric encryption algorithm, the first terminal device executes a secure hash algorithm on the shared secret.

在本發明的一實施例中,上述的第二終端裝置自伺服器接收群組金鑰密文、臨時公鑰以及對應於第一終端裝置的第一公鑰;第二終端裝置基於橢圓曲線迪菲-赫爾曼密鑰交換演算法而根據臨時公鑰以及對應於第二公鑰的第二私鑰取得共享秘密;以及第二終端裝置基於對應於對稱加密演算法的對稱解密演算法而根據共享秘密以及群組金鑰密文取得第二群組金鑰。In an embodiment of the present invention, the above-mentioned second terminal device receives the group key ciphertext, the temporary public key and the first public key corresponding to the first terminal device from the server; the second terminal device is based on the elliptic curve Di The Fischer-Hellman key exchange algorithm obtains the shared secret based on the temporary public key and the second private key corresponding to the second public key; and the second terminal device obtains the shared secret based on the symmetric decryption algorithm corresponding to the symmetric encryption algorithm The shared secret and the group key ciphertext obtain the second group key.

在本發明的一實施例中,在執行對稱解密演算法之前,第二終端裝置對共享秘密執行安全雜湊演算法。In an embodiment of the present invention, before executing the symmetric decryption algorithm, the second terminal device executes a secure hash algorithm on the shared secret.

在本發明的一實施例中,上述的第二終端裝置根據第二群組金鑰更新儲存在第二終端裝置且對應於第一終端裝置的第一成員金鑰;以及第二終端裝置根據第二群組金鑰更新儲存在第二終端裝置且對應於第二終端裝置的第二成員金鑰。In an embodiment of the present invention, the above-mentioned second terminal device updates the first member key stored in the second terminal device and corresponding to the first terminal device according to the second group key; The two group keys are updated and stored in the second terminal device and correspond to the second member key of the second terminal device.

在本發明的一實施例中,上述的伺服器響應於第二終端裝置登入群組即時通訊而傳送群組金鑰密文至第二終端裝置。In an embodiment of the present invention, the above-mentioned server transmits the group key ciphertext to the second terminal device in response to the second terminal device logging into the group instant messaging.

在本發明的一實施例中,上述的第一終端裝置對第一成員金鑰執行第一雜湊訊息鑑別碼運算以產生第一訊息金鑰;以及第一終端裝置對第一成員金鑰執行第二雜湊訊息鑑別碼運算以更新第一成員金鑰。In an embodiment of the present invention, the above-mentioned first terminal device performs the first hash message authentication code operation on the first member key to generate the first message key; and the first terminal device performs the first hash message key operation on the first member key. The two-hash message authenticator operates to update the first member key.

在本發明的一實施例中,上述的第一終端裝置對根據第一訊息金鑰對訊息進行加密以產生加密訊息。In an embodiment of the present invention, the above-mentioned first terminal device encrypts the message according to the first message key to generate the encrypted message.

在本發明的一實施例中,上述的第二終端裝置自第一終端裝置接收加密訊息以及金鑰資訊;響應於接收金鑰資訊,第二終端裝置對第一成員金鑰執行第一雜湊訊息鑑別碼運算以取得第一訊息金鑰;以及響應於接收金鑰資訊,第二終端裝置對第一成員金鑰執行第二雜湊訊息鑑別碼運算以更新儲存在第二終端的第一成員金鑰。In an embodiment of the present invention, the above-mentioned second terminal device receives the encrypted message and the key information from the first terminal device; in response to receiving the key information, the second terminal device executes the first hash message on the first member key an authenticator operation to obtain a first message key; and in response to receiving the key information, the second terminal device performs a second hash message authentication code operation on the first member key to update the first member key stored in the second terminal .

在本發明的一實施例中,上述的第二終端裝置對根據第一訊息金鑰對加密訊息進行解密以取得訊息。In an embodiment of the present invention, the above-mentioned second terminal device decrypts the encrypted message according to the first message key to obtain the message.

在本發明的一實施例中,上述的第一終端裝置基於橢圓曲線密碼學演算法產生對應於第一終端裝置的第一公鑰以及對應於第一公鑰的第一私鑰,並且基於公開金鑰密碼學產生憑證以及對應於憑證的數位簽章。第一終端裝置傳送第一公鑰、憑證以及數位簽章至伺服器以註冊加入群組即時通訊。In an embodiment of the present invention, the above-mentioned first terminal device generates a first public key corresponding to the first terminal device and a first private key corresponding to the first public key based on an elliptic curve cryptographic algorithm, and based on the public Key cryptography produces a certificate and a digital signature corresponding to the certificate. The first terminal device sends the first public key, the certificate and the digital signature to the server to register and join the group instant messaging.

在本發明的一實施例中,上述的第一終端裝置基於對應於橢圓曲線密碼學演算法的定義域產生第一公鑰、第一私鑰、第二群組金鑰、臨時公鑰以及臨時私鑰。In an embodiment of the present invention, the above-mentioned first terminal device generates a first public key, a first private key, a second group key, a temporary public key, and a temporary public key based on a definition domain corresponding to an elliptic curve cryptographic algorithm private key.

在本發明的一實施例中,上述的伺服器自群組即時通訊的成員接收異動資訊,並且根據異動資訊使第一群組金鑰失效。In an embodiment of the present invention, the above-mentioned server receives change information from members of the group instant messaging, and invalidates the first group key according to the change information.

在本發明的一實施例中,上述的伺服器自第一終端裝置接收訊息,其中訊息包含數位簽章;以及伺服器根據憑證驗證數位簽章以判斷訊息的來源是否正確。In an embodiment of the present invention, the above-mentioned server receives a message from the first terminal device, wherein the message includes a digital signature; and the server verifies the digital signature according to the certificate to determine whether the source of the message is correct.

在本發明的一實施例中,上述的第二終端裝置自第一終端裝置接收訊息,其中訊息包含數位簽章;以及第二終端裝置根據憑證驗證數位簽章以判斷訊息的來源是否正確。In an embodiment of the present invention, the second terminal device receives a message from the first terminal device, wherein the message includes a digital signature; and the second terminal device verifies the digital signature according to the certificate to determine whether the source of the message is correct.

本發明的一種群組即時通訊的加密方法,包含:伺服器通訊連接至第一終端裝置以及第二終端裝置;伺服器傳送群組金鑰狀態至第一終端裝置;響應於群組金鑰狀態指示第一群組金鑰失效,第一終端裝置基於橢圓曲線密碼學演算法產生第二群組金鑰、臨時公鑰以及對應於臨時公鑰的臨時私鑰;第一終端裝置根據第二群組金鑰、臨時私鑰以及對應於第二終端裝置的第二公鑰產生群組金鑰密文;響應於自第一終端裝置接收群組金鑰密文,伺服器傳送對應於第二群組金鑰的金鑰資訊至第一終端裝置;響應於自伺服器接收金鑰資訊,第一終端裝置根據第二群組金鑰更新對應於第一終端裝置的第一成員金鑰;以及第一終端裝置根據第一成員金鑰與第二終端裝置進行通訊。An encryption method for group instant messaging of the present invention includes: a server is connected to a first terminal device and a second terminal device for communication; the server transmits a group key state to the first terminal device; in response to the group key state Indicates that the first group key is invalid, and the first terminal device generates a second group key, a temporary public key and a temporary private key corresponding to the temporary public key based on the elliptic curve cryptographic algorithm; the first terminal device generates a second group key according to the second group The group key, the temporary private key, and the second public key corresponding to the second terminal device generate the group key ciphertext; in response to receiving the group key ciphertext from the first terminal device, the server transmits the ciphertext corresponding to the second group the key information of the group key to the first terminal device; in response to receiving the key information from the server, the first terminal device updates the first member key corresponding to the first terminal device according to the second group key; A terminal device communicates with the second terminal device according to the first member key.

基於上述,在本發明中,使用服務的終端裝置可產生公鑰。使用公鑰與臨時私鑰進行ECDH運算與對稱式加密方式,達到端到端加密傳送群組金鑰至各成員。透過伺服器將成員異動與群組金鑰狀態進行統一控管,確保成員異動不影響安全性。於終端裝置內部展開群組金鑰至成員金鑰,並基於成員金鑰而利用棘輪方式產生訊息金鑰與下一輪的成員金鑰,藉已降低成員數量對效能之影響,並提供前向安全(forward secrecy,FS)。最後,所有需要終端裝置透過網路傳出的資料皆與數位簽章結合,接收端可在接受到資料後進行簽章驗證,確保資料的完整性並且驗證傳送端的身分。Based on the above, in the present invention, the terminal device using the service can generate the public key. Use the public key and temporary private key to perform ECDH operation and symmetric encryption to achieve end-to-end encryption and transmit the group key to each member. Unified control of member changes and group key status through the server to ensure that member changes do not affect security. Expand the group key to the member key inside the terminal device, and use the ratchet method to generate the message key and the next round member key based on the member key, thereby reducing the impact of the number of members on performance and providing forward security (forward secret, FS). Finally, all data that needs to be transmitted from the terminal device through the network are combined with digital signatures, and the receiving end can perform signature verification after receiving the data to ensure the integrity of the data and verify the identity of the transmitting end.

本發明提供一種群組即時通訊的加密系統和加密方法,可基於非對稱式加密方法同步群組金鑰,並於終端裝置內運算展開後的成員金鑰,隨後利用成員金鑰衍生出訊息金鑰以進行訊息加密,藉以達到端點加密,並且有效降低成員數量對運算量與傳輸量的影響。本發明可由群組中的其中一人進行群組金鑰同步,伺服器可進行群組金鑰狀態管理,並於終端裝置內部由群組金鑰衍生成數把成員金鑰,再由成員金鑰衍生出加解密訊息的訊息金鑰,達到降低人數對運算量與傳輸量之影響,確保群組成員異動仍保有通訊安全性。The present invention provides an encryption system and an encryption method for group instant messaging, which can synchronize group keys based on an asymmetric encryption method, calculate the expanded member keys in a terminal device, and then use the member keys to derive message keys The key is used for message encryption, so as to achieve endpoint encryption, and effectively reduce the impact of the number of members on the amount of computation and transmission. In the present invention, one person in the group can synchronize the group key, the server can manage the state of the group key, and in the terminal device, the group key is derived into several member keys, which are then derived from the member keys. The message key for encrypting and decrypting messages is released to reduce the impact of the number of people on the computation and transmission volume, and to ensure the security of communication when group members change.

圖1根據本發明的一實施例繪示一種群組即時通訊的加密系統10的示意圖,加密系統10可包含伺服器100以及執行群組即時通訊的群組200,其中群組200可包含終端裝置a或終端裝置b等多個終端裝置。伺服器100可與群組200中的每一個終端裝置通訊連接。1 is a schematic diagram of an encryption system 10 for group instant messaging according to an embodiment of the present invention. The encryption system 10 may include a server 100 and a group 200 for performing group instant messaging, wherein the group 200 may include terminal devices Multiple terminal devices such as a or terminal device b. The server 100 can communicate with each terminal device in the group 200 .

伺服器100具有處理單元(例如:處理器但不限於此)、通訊單元(例如:各類通訊晶片、行動通訊晶片、藍芽晶片、WiFi晶片等但不限於此)及儲存單元(例如:可移動隨機存取記憶體、快閃記憶體、硬碟等但不限於此)等運行管理伺服器110的必要構件。The server 100 has a processing unit (such as a processor but not limited thereto), a communication unit (such as various communication chips, mobile communication chips, bluetooth chips, WiFi chips, etc., but not limited thereto) and a storage unit (for example, a The necessary components for running the management server 110 such as mobile random access memory, flash memory, hard disk, etc., are not limited thereto.

終端裝置a(或終端裝置b)可以包含、伺服器、客戶端、桌上型電腦、筆記型電腦、網路型電腦、工作站、個人數位助理(personal digital assistant,PDA)、個人電腦(personal computer,PC)、平板電腦或電話裝置等。終端裝置a(或終端裝置b)可至少含有但不限於收發器電路、類比數位(A/D)/數位類比(D/A)轉換器、處理電路、任選的記憶體電路,以及一個或多個天線單元。Terminal device a (or terminal device b) may include, server, client, desktop computer, notebook computer, network computer, workstation, personal digital assistant (PDA), personal computer (personal computer) , PC), tablet or telephone device, etc. Terminal device a (or terminal device b) may contain at least but not limited to transceiver circuits, analog-to-digital (A/D)/digital-to-analog (D/A) converters, processing circuits, optional memory circuits, and one or multiple antenna units.

圖2根據本發明的一實施例繪示註冊程序的訊令圖。在步驟S201中,終端裝置a可基於橢圓曲線密碼學(elliptic curve cryptography,ECC)演算法產生對應於終端裝置a的公鑰

Figure 02_image001
以及對應於公鑰
Figure 02_image001
的私鑰
Figure 02_image003
。具體來說,終端裝置a可根據ECC演算法的定義域
Figure 02_image005
產生終端裝置a的公鑰
Figure 02_image001
以及私鑰
Figure 02_image007
。 FIG. 2 illustrates a signaling diagram of a registration process according to an embodiment of the present invention. In step S201, the terminal device a may generate a public key corresponding to the terminal device a based on an elliptic curve cryptography (ECC) algorithm
Figure 02_image001
and corresponding to the public key
Figure 02_image001
's private key
Figure 02_image003
. Specifically, the terminal device a may be based on the definition domain of the ECC algorithm
Figure 02_image005
Generate the public key of the terminal device a
Figure 02_image001
and private key
Figure 02_image007
.

在一實施例中,終端裝置a可進一步產生終端裝置a的憑證

Figure 02_image009
、對應於憑證
Figure 02_image009
的簽章公鑰
Figure 02_image011
、對應於簽章公鑰
Figure 02_image011
的簽章私鑰
Figure 02_image013
以及使用簽章私鑰
Figure 02_image015
對公鑰
Figure 02_image001
簽章而產生的數位簽章
Figure 02_image017
。憑證
Figure 02_image009
可用以驗證數位簽章
Figure 02_image017
。舉例來說,假設終端裝置a想透過伺服器100傳送一個訊息給終端裝置b。終端裝置a可將數位簽章
Figure 02_image017
加入所述訊息中。在終端裝置b接收到所述訊息後,終端裝置b可根據終端裝置b內的數位憑證鏈驗證憑證
Figure 02_image009
為可信任之憑證,隨後再使用憑證
Figure 02_image009
驗證所述訊息中的數位簽章
Figure 02_image017
。若驗證的結果為成功且能正常地使用公鑰
Figure 02_image001
解密所述訊息,則終端裝置b可判斷訊息確實來自於終端裝置a。也就是說,訊息的來源是正確的。若驗證的結果為失敗或無法通過公鑰
Figure 02_image001
正常地解密所述訊息,則終端裝置b可判斷訊息並非來自於終端裝置a。也就是說,訊息的來源是錯誤的。 In one embodiment, the terminal device a may further generate a credential of the terminal device a
Figure 02_image009
, corresponding to the certificate
Figure 02_image009
's signature public key
Figure 02_image011
, corresponding to the signature public key
Figure 02_image011
The signature private key of
Figure 02_image013
and use the signature private key
Figure 02_image015
to the public key
Figure 02_image001
digital signature
Figure 02_image017
. certificate
Figure 02_image009
Can be used to verify digital signatures
Figure 02_image017
. For example, it is assumed that the terminal device a wants to send a message to the terminal device b through the server 100 . Terminal device a can digitally sign
Figure 02_image017
to the message. After the terminal device b receives the message, the terminal device b can verify the certificate according to the digital certificate chain in the terminal device b
Figure 02_image009
is a trusted certificate, and then use the certificate
Figure 02_image009
Verify the digital signature in the message
Figure 02_image017
. If the verification result is successful and the public key can be used normally
Figure 02_image001
After decrypting the message, the terminal device b can determine that the message really comes from the terminal device a. That is, the source of the message is correct. If the result of verification is failed or cannot pass the public key
Figure 02_image001
If the message is decrypted normally, the terminal device b can determine that the message does not come from the terminal device a. That is, the source of the message is wrong.

在一實施例中,終端裝置a可根據公開金鑰密碼學(public-key cryptography)產生簽章公鑰

Figure 02_image011
與簽章私鑰
Figure 02_image013
。 In one embodiment, the terminal device a can generate the signature public key according to public-key cryptography
Figure 02_image011
and signature private key
Figure 02_image013
.

在步驟S202中,終端裝置a可將對應於終端裝置a的公鑰

Figure 02_image001
、憑證
Figure 02_image009
以及數位簽章
Figure 02_image017
傳送至伺服器100,藉以註冊加入群組即時通訊。群組200中的每一個終端裝置(例如:終端裝置b)可存取伺服器100以自伺服器100取得公鑰
Figure 02_image001
、憑證
Figure 02_image009
或數位簽章
Figure 02_image017
等資訊。 In step S202, the terminal device a may convert the public key corresponding to the terminal device a
Figure 02_image001
,certificate
Figure 02_image009
and digital signature
Figure 02_image017
It is sent to the server 100 to register to join the group instant messaging. Each terminal device (eg: terminal device b) in the group 200 can access the server 100 to obtain the public key from the server 100
Figure 02_image001
,certificate
Figure 02_image009
or digital signature
Figure 02_image017
and other information.

在步驟S203中,終端裝置b可基於橢圓曲線密碼學(elliptic curve cryptography,ECC)演算法產生對應於終端裝置b的公鑰

Figure 02_image019
以及對應於公鑰
Figure 02_image019
的私鑰
Figure 02_image021
。具體來說,終端裝置b可根據ECC演算法的定義域
Figure 02_image005
產生終端裝置b的公鑰
Figure 02_image019
以及私鑰
Figure 02_image021
。也就是說,公鑰
Figure 02_image001
、私鑰
Figure 02_image007
、公鑰
Figure 02_image019
以及私鑰
Figure 02_image021
是基於相同的定義域產生的。 In step S203, the terminal device b may generate a public key corresponding to the terminal device b based on an elliptic curve cryptography (ECC) algorithm
Figure 02_image019
and corresponding to the public key
Figure 02_image019
's private key
Figure 02_image021
. Specifically, the terminal device b can be based on the definition domain of the ECC algorithm
Figure 02_image005
Generate the public key of the terminal device b
Figure 02_image019
and private key
Figure 02_image021
. That is, the public key
Figure 02_image001
, private key
Figure 02_image007
, public key
Figure 02_image019
and private key
Figure 02_image021
are generated based on the same domain of definition.

在一實施例中,終端裝置b可進一步產生終端裝置b的憑證

Figure 02_image023
、對應於憑證
Figure 02_image023
的簽章公鑰
Figure 02_image025
、對應於簽章公鑰
Figure 02_image025
的簽章私鑰
Figure 02_image027
以及使用簽章私鑰
Figure 02_image027
對公鑰
Figure 02_image019
簽章而產生的數位簽章
Figure 02_image029
。憑證
Figure 02_image023
可用以驗證數位簽章
Figure 02_image029
。舉例來說,假設終端裝置b想透過伺服器100傳送一個訊息給終端裝置a。終端裝置b可將數位簽章
Figure 02_image029
加入所述訊息中。在終端裝置a接收到所述訊息後,終端裝置a可根據終端裝置a內的數位憑證鏈驗證憑證
Figure 02_image023
為可信任之憑證,隨後再使用憑證
Figure 02_image023
驗證所述訊息中的數位簽章
Figure 02_image029
。若驗證的結果為成功且能正常地使用
Figure 02_image031
解密所述訊息,則終端裝置a可判斷訊息確實來自於終端裝置b。也就是說,訊息的來源是正確的。若驗證的結果為失敗或無法通過
Figure 02_image031
正常地解密所述訊息,則終端裝置a可判斷訊息並非來自於終端裝置b。也就是說,訊息的來源是錯誤的。 In one embodiment, the terminal device b can further generate the certificate of the terminal device b
Figure 02_image023
, corresponding to the certificate
Figure 02_image023
's signature public key
Figure 02_image025
, corresponding to the signature public key
Figure 02_image025
The signature private key of
Figure 02_image027
and use the signature private key
Figure 02_image027
to the public key
Figure 02_image019
digital signature
Figure 02_image029
. certificate
Figure 02_image023
Can be used to verify digital signatures
Figure 02_image029
. For example, it is assumed that the terminal device b wants to send a message to the terminal device a through the server 100 . Terminal device b can digitally sign
Figure 02_image029
to the message. After the terminal device a receives the message, the terminal device a can verify the certificate according to the digital certificate chain in the terminal device a
Figure 02_image023
is a trusted certificate, and then use the certificate
Figure 02_image023
Verify the digital signature in the message
Figure 02_image029
. If the verification result is successful and can be used normally
Figure 02_image031
After decrypting the message, terminal device a can determine that the message really comes from terminal device b. That is, the source of the message is correct. If the verification result is failed or failed
Figure 02_image031
If the message is decrypted normally, the terminal device a can determine that the message does not come from the terminal device b. That is, the source of the message is wrong.

在一實施例中,終端裝置b可根據公開金鑰密碼學產生簽章公鑰

Figure 02_image025
與簽章私鑰
Figure 02_image027
。 In one embodiment, the terminal device b can generate the signature public key according to public key cryptography
Figure 02_image025
and signature private key
Figure 02_image027
.

在步驟S204中,終端裝置b可將對應於終端裝置b的公鑰

Figure 02_image019
、憑證
Figure 02_image023
以及數位簽章
Figure 02_image029
傳送至伺服器100,藉以註冊加入群組即時通訊。群組200中的每一個終端裝置(例如:終端裝置a)可存取伺服器100以自伺服器100取得公鑰
Figure 02_image019
、憑證
Figure 02_image023
以及數位簽章
Figure 02_image029
等資訊。 In step S204, the terminal device b may convert the public key corresponding to the terminal device b
Figure 02_image019
,certificate
Figure 02_image023
and digital signature
Figure 02_image029
It is sent to the server 100 to register to join the group instant messaging. Each terminal device (eg: terminal device a) in the group 200 can access the server 100 to obtain the public key from the server 100
Figure 02_image019
,certificate
Figure 02_image023
and digital signature
Figure 02_image029
and other information.

圖3根據本發明的一實施例繪示成員異動程序的訊令圖。在步驟S301中,伺服器100可自群組即時通訊的成員(即:群組200的成員,例如終端裝置a或終端裝置b)接收異動資訊。異動資訊可指示群組200中的某一個終端裝置執行了下列步驟的至少其中之一:自行退出群組200、將其他成員退出群組200或將新成員加入群組200中。FIG. 3 shows a signaling diagram of a member change procedure according to an embodiment of the present invention. In step S301 , the server 100 may receive change information from members of the group instant messaging (ie, members of the group 200 , such as terminal device a or terminal device b). The change information may indicate that a certain terminal device in the group 200 has performed at least one of the following steps: withdrawing from the group 200 by itself, withdrawing other members from the group 200 or adding a new member to the group 200 .

在步驟S302中,伺服器100可根據異動資訊使群組200的群組金鑰失效。舉例來說,假設群組即時通訊(或群組200)的初始群組金鑰為群組金鑰

Figure 02_image033
。伺服器100可根據異動資訊而使群組金鑰
Figure 02_image033
失效。值得注意的是,群組金鑰
Figure 02_image033
例如是依據定義域
Figure 02_image005
而產生的。也就是說,群組金鑰
Figure 02_image033
、公鑰
Figure 02_image001
、私鑰
Figure 02_image007
、公鑰
Figure 02_image019
以及私鑰
Figure 02_image021
是基於相同的定義域產生的。 In step S302, the server 100 may invalidate the group key of the group 200 according to the change information. For example, suppose the initial group key of group chat (or group 200) is the group key
Figure 02_image033
. The server 100 can use the group key according to the change information
Figure 02_image033
invalid. It's worth noting that the group key
Figure 02_image033
For example, according to the domain of definition
Figure 02_image005
generated. That is, the group key
Figure 02_image033
, public key
Figure 02_image001
, private key
Figure 02_image007
, public key
Figure 02_image019
and private key
Figure 02_image021
are generated based on the same domain of definition.

在步驟S303中,伺服器100可傳送群組金鑰狀態至終端裝置a,其中所述群組金鑰狀態可指示群組金鑰

Figure 02_image033
已經失效。在步驟S304中,伺服器100可在終端裝置b登入群組即時通訊時傳送群組金鑰狀態至終端裝置b,其中所述群組金鑰狀態可指示群組金鑰
Figure 02_image033
已經失效。也就是說,在群組金鑰
Figure 02_image033
失效後,伺服器100可將指示群組金鑰
Figure 02_image033
失效的群組金鑰狀態廣播給群組200中的成員。 In step S303, the server 100 may transmit the group key status to the terminal device a, wherein the group key status may indicate the group key
Figure 02_image033
has expired. In step S304, the server 100 may transmit the group key status to the terminal device b when the terminal device b logs in to the group instant messaging, wherein the group key status may indicate the group key
Figure 02_image033
has expired. That is, in the group key
Figure 02_image033
After the expiration, the server 100 can indicate the group key
Figure 02_image033
The expired group key status is broadcast to members in group 200 .

圖4根據本發明的一實施例繪示金鑰同步程序的訊令圖。在步驟S401中,響應於群組金鑰狀態指示群組金鑰

Figure 02_image033
失效,終端裝置a可基於ECC演算法產生群組金鑰
Figure 02_image035
、臨時公鑰
Figure 02_image037
以及對應於臨時公鑰
Figure 02_image037
的臨時私鑰
Figure 02_image039
。群組金鑰
Figure 02_image035
、臨時公鑰
Figure 02_image037
以及臨時私鑰
Figure 02_image039
例如是依據定義域
Figure 02_image005
而產生的。也就是說,群組金鑰
Figure 02_image035
、臨時公鑰
Figure 02_image037
以及臨時私鑰
Figure 02_image039
是基於與群組金鑰
Figure 02_image033
相同的定義域產生的。 FIG. 4 illustrates a signaling diagram of a key synchronization process according to an embodiment of the present invention. In step S401, the group key is indicated in response to the group key status
Figure 02_image033
If it fails, the terminal device a can generate the group key based on the ECC algorithm
Figure 02_image035
, temporary public key
Figure 02_image037
and corresponding to the ephemeral public key
Figure 02_image037
ephemeral private key
Figure 02_image039
. group key
Figure 02_image035
, temporary public key
Figure 02_image037
and the temporary private key
Figure 02_image039
For example, according to the domain of definition
Figure 02_image005
generated. That is, the group key
Figure 02_image035
, temporary public key
Figure 02_image037
and the temporary private key
Figure 02_image039
is based on the group key
Figure 02_image033
generated from the same domain.

在步驟S402中,終端裝置a可根據群組金鑰

Figure 02_image035
、臨時私鑰
Figure 02_image039
、以及對應於群組200中的成員的公鑰產生將發送給所述成員的群組金鑰密文。以終端裝置b為例,終端裝置a可根據群組金鑰
Figure 02_image035
、臨時私鑰
Figure 02_image039
以及終端裝置b的公鑰
Figure 02_image019
產生將被發送給終端裝置b的群組金鑰密文
Figure 02_image041
。 In step S402, the terminal device a can use the group key
Figure 02_image035
, temporary private key
Figure 02_image039
, and corresponding to the public keys of members in group 200 to generate a group key ciphertext to be sent to said members. Taking terminal device b as an example, terminal device a can
Figure 02_image035
, temporary private key
Figure 02_image039
and the public key of terminal device b
Figure 02_image019
Generate group key ciphertext to be sent to terminal device b
Figure 02_image041
.

具體來說,終端裝置a可基於橢圓曲線迪菲-赫爾曼密鑰交換(elliptic curve Diffie–Hellman key exchange,EDCH)演算法而根據臨時私鑰

Figure 02_image039
以及公鑰
Figure 02_image019
產生對應於終端裝置a和終端裝置b的共享秘密(或密鑰加密鑰(key-encryption key))
Figure 02_image043
,如方程式(1)所示,其中
Figure 02_image045
代表對公鑰P和私鑰R執行ECDH運算。
Figure 02_image047
…(1) Specifically, the terminal device a may obtain the temporary private key based on the elliptic curve Diffie-Hellman key exchange (EDCH) algorithm
Figure 02_image039
and public key
Figure 02_image019
Generate a shared secret (or key-encryption key) corresponding to terminal device a and terminal device b
Figure 02_image043
, as shown in equation (1), where
Figure 02_image045
Represents an ECDH operation on the public key P and the private key R.
Figure 02_image047
…(1)

接著,終端裝置a可對共享秘密

Figure 02_image043
執行安全雜湊演算法(secure hash algorithm,SHA),藉以調整共享秘密
Figure 02_image043
的尺寸以使共享秘密
Figure 02_image043
適應於即將使用的對稱加密演算法。舉例來說,在對共享秘密
Figure 02_image043
執行AES-256對稱加密演算法之前,終端裝置a可先對共享秘密
Figure 02_image043
執行SHA-256安全雜湊演算法,藉以將共享秘密
Figure 02_image043
的尺寸調整為適用於AES-256的256位元。 Then, the terminal device a can respond to the shared secret
Figure 02_image043
Execute a secure hash algorithm (SHA) to adjust the shared secret
Figure 02_image043
size to enable the shared secret
Figure 02_image043
Adapt to the symmetric encryption algorithm to be used. For example, in the shared secret
Figure 02_image043
Before executing the AES-256 symmetric encryption algorithm, the terminal device a can
Figure 02_image043
Executes the SHA-256 secure hash algorithm, whereby the shared secret is
Figure 02_image043
is resized to 256 bits for AES-256.

而後,終端裝置a可基於對稱加密演算法而根據共享秘密

Figure 02_image043
以及群組金鑰
Figure 02_image035
產生群組金鑰密文
Figure 02_image041
,如方程式(2)所示,其中
Figure 02_image049
代表基於AES演算法使用金鑰k對明文p(plaintext)進行加密。
Figure 02_image051
…(2) Then, the terminal device a can use the shared secret based on the symmetric encryption algorithm
Figure 02_image043
and group key
Figure 02_image035
Generate group key ciphertext
Figure 02_image041
, as shown in equation (2), where
Figure 02_image049
Represents the encryption of the plaintext p (plaintext) with the key k based on the AES algorithm.
Figure 02_image051
…(2)

在步驟S403中,終端裝置a可傳送至少包含群組金鑰密文

Figure 02_image041
以及臨時公鑰
Figure 02_image037
的金鑰訊息至伺服器100。在步驟S404中,伺服器100可驗證金鑰訊息的合法性。 In step S403, the terminal device a may transmit a ciphertext containing at least the group key
Figure 02_image041
and the ephemeral public key
Figure 02_image037
the key message to the server 100. In step S404, the server 100 may verify the validity of the key message.

在一實施例中,伺服器100可根據群組200的當前群組金鑰狀態判斷金鑰訊息是否合法。若群組金鑰狀態指示群組200的當前群組金鑰是失效(或不存在),則伺服器100可判斷金鑰訊息是合法的。若群組金鑰狀態指示群組200的當前群組金鑰是有效的,則伺服器100可判斷金鑰訊息是非法的。舉例來說,若群組金鑰狀態指示群組200的當前群組金鑰

Figure 02_image033
是失效的,則伺服器100可判斷金鑰訊息是合法的。 In one embodiment, the server 100 can determine whether the key message is valid according to the current group key state of the group 200 . If the group key status indicates that the current group key of the group 200 is invalid (or does not exist), the server 100 may determine that the key message is valid. If the group key status indicates that the current group key of the group 200 is valid, the server 100 may determine that the key message is invalid. For example, if the group key status indicates the current group key for group 200
Figure 02_image033
If it is invalid, the server 100 can determine that the key message is valid.

在一實施例中,伺服器100可基於群組200中的成員以及金鑰訊息中群組金鑰密文匹配而判斷金鑰訊息是合法的,並可基於群組200中的成員以及金鑰訊息中群組金鑰密文不匹配而判斷金鑰訊息是非法的。舉例來說,假設群組200包含多個成員,其中所述多個成員包含終端裝置a和終端裝置b。如此,伺服器100自終端裝置a所接收的金鑰訊息需包含分別對應於除了終端裝置a的多個其他成員的多個群組金鑰密文,其中所述多個群組金鑰密文包含對應於終端裝置b的群組金鑰密文

Figure 02_image041
。若金鑰訊息中缺少了某一位成員的群組金鑰密文,則伺服器100可判斷金鑰訊息是非法的。 In one embodiment, the server 100 may determine that the key message is valid based on the members in the group 200 and the group key ciphertext in the key message matching, and may determine that the key message is valid based on the members in the group 200 and the key The group key ciphertext in the message does not match and the key message is judged to be invalid. For example, assume that group 200 includes multiple members, wherein the multiple members include terminal device a and terminal device b. In this way, the key message received by the server 100 from the terminal device a needs to include a plurality of group key ciphertexts respectively corresponding to a plurality of other members except the terminal device a, wherein the plurality of group key ciphertexts Contains the group key ciphertext corresponding to terminal device b
Figure 02_image041
. If the group key ciphertext of a certain member is missing from the key message, the server 100 may determine that the key message is invalid.

在一實施例中,伺服器100可根據憑證

Figure 02_image053
判斷來自終端裝置a的金鑰訊息是否是合法的。若金鑰訊息包含與憑證
Figure 02_image055
匹配的數位簽章
Figure 02_image017
,則伺服器100可判斷金鑰訊息是合法的。若金鑰訊息不包含與憑證
Figure 02_image055
匹配的數位簽章
Figure 02_image017
,則伺服器100可判斷金鑰訊息是非法的。 In one embodiment, the server 100 may
Figure 02_image053
It is judged whether the key message from the terminal device a is legitimate. If the key message contains and the certificate
Figure 02_image055
matching digital signature
Figure 02_image017
, the server 100 can determine that the key message is valid. If the key message does not contain and certificate
Figure 02_image055
matching digital signature
Figure 02_image017
, the server 100 can determine that the key message is illegal.

在步驟S405中,若金鑰訊息是合法的,伺服器100可傳送對應於群組金鑰

Figure 02_image035
的金鑰資訊至終端裝置a,其中金鑰資訊可包含對應於群組金鑰
Figure 02_image035
的群組金鑰識別碼
Figure 02_image057
。值得注意的是,伺服器100並不需要也無法解密群組金鑰密文
Figure 02_image041
以取得群組金鑰
Figure 02_image035
,而僅需要將與群組金鑰密文
Figure 02_image041
相對應的群組金鑰識別碼
Figure 02_image057
傳送給終端裝置a即可。終端裝置a可響應於接收到群組金鑰識別碼
Figure 02_image057
而判斷伺服器100已經同意使用群組金鑰
Figure 02_image035
。因此,終端裝置a將可使用群組金鑰
Figure 02_image035
來執行群組即時通訊。 In step S405, if the key message is valid, the server 100 may transmit the corresponding group key
Figure 02_image035
The key information of the terminal device a, wherein the key information may contain the corresponding group key
Figure 02_image035
group key identifier for
Figure 02_image057
. It is worth noting that the server 100 does not need and cannot decrypt the group key ciphertext
Figure 02_image041
to get the group key
Figure 02_image035
, but only need to be ciphertext with the group key
Figure 02_image041
Corresponding group key identifier
Figure 02_image057
It is sufficient to transmit it to the terminal device a. Terminal device a may respond to receiving the group key identification code
Figure 02_image057
And it is determined that the server 100 has agreed to use the group key
Figure 02_image035
. Therefore, terminal device a will be able to use the group key
Figure 02_image035
to perform group chat.

在步驟S406中,響應於接收到金鑰資訊,終端裝置a可根據群組金鑰

Figure 02_image035
更新儲存在終端裝置a的多個成員金鑰,其中所述多個成員金鑰分別對應於群組200中的多個成員。舉例來說,終端裝置a可根據群組金鑰
Figure 02_image035
更新儲存在終端裝置a且對應於終端裝置a的成員金鑰
Figure 02_image059
。此外,終端裝置a可根據群組金鑰
Figure 02_image035
更新儲存在終端裝置a且對應於終端裝置b的成員金鑰
Figure 02_image061
。更新成員金鑰的詳細步驟可參考如圖5所示的步驟S504。終端裝置a可通過成員金鑰
Figure 02_image059
以與群組200中的成員(例如:終端裝置b)進行通訊。舉例來說,終端裝置a可利用成員金鑰
Figure 02_image059
對訊息進行加密以產生加密訊息,並可將加密訊息傳送給終端裝置b。終端裝置b可利用成員金鑰
Figure 02_image059
解密所述加密訊息以取得所述訊息。 In step S406, in response to receiving the key information, the terminal device a can
Figure 02_image035
A plurality of member keys stored in the terminal device a are updated, wherein the plurality of member keys respectively correspond to a plurality of members in the group 200 . For example, the terminal device a can use the group key
Figure 02_image035
Update the member key stored in terminal device a and corresponding to terminal device a
Figure 02_image059
. In addition, the terminal device a can use the group key
Figure 02_image035
Update the member key stored in terminal device a and corresponding to terminal device b
Figure 02_image061
. For the detailed steps of updating the member key, please refer to step S504 shown in FIG. 5 . Terminal device a can pass the membership key
Figure 02_image059
to communicate with members of the group 200 (eg, terminal device b). For example, terminal device a may utilize the membership key
Figure 02_image059
The message is encrypted to generate an encrypted message, and the encrypted message can be transmitted to the terminal device b. Terminal device b can use the membership key
Figure 02_image059
Decrypt the encrypted message to obtain the message.

在一實施例中,終端裝置a可根據基於橢圓曲線迪菲-赫爾曼密鑰交換演算法而根據公鑰

Figure 02_image063
以及群組金鑰
Figure 02_image035
產生對應於終端裝置a的成員金鑰
Figure 02_image059
,如方程式(3)所示。
Figure 02_image065
…(3) In one embodiment, the terminal device a can use the public key according to the elliptic curve-based Diffie-Hellman key exchange algorithm
Figure 02_image063
and group key
Figure 02_image035
Generate a member key corresponding to terminal device a
Figure 02_image059
, as shown in equation (3).
Figure 02_image065
…(3)

在一實施例中,終端裝置a可根據基於橢圓曲線迪菲-赫爾曼密鑰交換演算法而根據公鑰

Figure 02_image067
以及群組金鑰
Figure 02_image035
產生對應於終端裝置b的成員金鑰
Figure 02_image061
,如方程式(4)所示。
Figure 02_image069
…(4) In one embodiment, the terminal device a can use the public key according to the elliptic curve-based Diffie-Hellman key exchange algorithm
Figure 02_image067
and group key
Figure 02_image035
Generate a member key corresponding to terminal device b
Figure 02_image061
, as shown in equation (4).
Figure 02_image069
…(4)

在步驟S407中,若金鑰訊息是合法的,伺服器100可傳送群組金鑰密文

Figure 02_image041
至終端裝置b。舉例來說,伺服器100可響應於偵測到終端裝置b登入群組200的群組即通訊而傳送群組金鑰密文
Figure 02_image041
至終端裝置b。 In step S407, if the key message is valid, the server 100 can transmit the group key ciphertext
Figure 02_image041
to terminal device b. For example, the server 100 may transmit the group key ciphertext in response to detecting that the terminal device b is logged into the group ie communication of the group 200
Figure 02_image041
to terminal device b.

在步驟S408中,終端裝置b可解密群組金鑰密文

Figure 02_image041
以取得群組金鑰
Figure 02_image035
。具體來說,終端裝置b可自伺服器100取得群組金鑰密文
Figure 02_image041
、臨時公鑰
Figure 02_image037
以及終端裝置a的公鑰
Figure 02_image001
。終端裝置b可基於橢圓曲線迪菲-赫爾曼密鑰交換演算法而根據臨時公鑰
Figure 02_image071
以及終端裝置b的私鑰
Figure 02_image073
產生對應於終端裝置a和終端裝置b的共享秘密
Figure 02_image043
,如方程式(5)所示,其中
Figure 02_image045
代表對公鑰P和私鑰R執行ECDH運算。
Figure 02_image075
…(5) In step S408, the terminal device b can decrypt the group key ciphertext
Figure 02_image041
to get the group key
Figure 02_image035
. Specifically, the terminal device b can obtain the group key ciphertext from the server 100
Figure 02_image041
, temporary public key
Figure 02_image037
and the public key of terminal device a
Figure 02_image001
. The terminal device b may use the ephemeral public key based on the elliptic curve Diffie-Hellman key exchange algorithm
Figure 02_image071
and the private key of terminal device b
Figure 02_image073
Generate a shared secret corresponding to terminal device a and terminal device b
Figure 02_image043
, as shown in equation (5), where
Figure 02_image045
Represents an ECDH operation on the public key P and the private key R.
Figure 02_image075
…(5)

接著,終端裝置b可對共享秘密

Figure 02_image043
執行安全雜湊演算法,藉以調整共享秘密
Figure 02_image043
的尺寸以使共享秘密
Figure 02_image043
適應於即將使用的對稱解密演算法。舉例來說,在對共享秘密
Figure 02_image043
執行AES-256對稱解密演算法之前,終端裝置b可先對共享秘密
Figure 02_image043
執行SHA-256安全雜湊演算法,藉以將共享秘密
Figure 02_image043
的尺寸調整為適用於AES-256的256位元。 Then, the terminal device b can
Figure 02_image043
Execute a secure hash algorithm to adjust the shared secret
Figure 02_image043
size to enable the shared secret
Figure 02_image043
Adapt to the symmetric decryption algorithm to be used. For example, in the shared secret
Figure 02_image043
Before executing the AES-256 symmetric decryption algorithm, the terminal device b can
Figure 02_image043
Executes the SHA-256 secure hash algorithm, whereby the shared secret is
Figure 02_image043
is resized to 256 bits for AES-256.

而後,終端裝置b可基於對稱解密演算法而根據共享秘密

Figure 02_image043
解密群組金鑰密文
Figure 02_image041
以取得群組金鑰
Figure 02_image035
,如方程式(6)所示,其中
Figure 02_image077
代表基於AES演算法使用共享秘密k對密文c(ciphertext)進行解密。
Figure 02_image079
…(6) Then, the terminal device b can use the shared secret based on the symmetric decryption algorithm
Figure 02_image043
Decrypt the group key ciphertext
Figure 02_image041
to get the group key
Figure 02_image035
, as shown in equation (6), where
Figure 02_image077
Represents the decryption of the ciphertext c (ciphertext) using the shared secret k based on the AES algorithm.
Figure 02_image079
…(6)

在步驟S409中,響應於取得群組金鑰

Figure 02_image035
,終端裝置b可根據群組金鑰
Figure 02_image035
更新儲存在終端裝置b的多個成員金鑰,其中所述多個成員金鑰分別對應於群組200中的多個成員。舉例來說,終端裝置b可根據群組金鑰
Figure 02_image035
更新儲存在終端裝置b且對應於終端裝置a的成員金鑰
Figure 02_image059
。此外,終端裝置b可根據群組金鑰
Figure 02_image035
更新儲存在終端裝置b且對應於終端裝置b的成員金鑰
Figure 02_image061
。更新成員金鑰的詳細步驟可參考如圖5所示的步驟S507。終端裝置b可通過成員金鑰
Figure 02_image061
以與群組200中的成員(例如:終端裝置a)進行通訊。舉例來說,終端裝置b可利用成員金鑰
Figure 02_image061
對訊息進行加密以產生加密訊息,並可將加密訊息傳送給終端裝置a。終端裝置a可利用成員金鑰
Figure 02_image061
解密所述加密訊息以取得所述訊息。 In step S409, in response to obtaining the group key
Figure 02_image035
, the terminal device b can use the group key
Figure 02_image035
A plurality of member keys stored in the terminal device b are updated, wherein the plurality of member keys respectively correspond to a plurality of members in the group 200 . For example, terminal device b can use the group key
Figure 02_image035
Update the member key stored in terminal device b and corresponding to terminal device a
Figure 02_image059
. In addition, the terminal device b can use the group key
Figure 02_image035
Update the member key stored in terminal device b and corresponding to terminal device b
Figure 02_image061
. For the detailed steps of updating the member key, please refer to step S507 shown in FIG. 5 . Terminal device b can pass the membership key
Figure 02_image061
to communicate with members of the group 200 (eg, terminal device a). For example, terminal device b may utilize the membership key
Figure 02_image061
The message is encrypted to generate an encrypted message, and the encrypted message can be transmitted to the terminal device a. Terminal device a can use the membership key
Figure 02_image061
Decrypt the encrypted message to obtain the message.

在一實施例中,終端裝置b可根據基於橢圓曲線迪菲-赫爾曼密鑰交換演算法而根據公鑰

Figure 02_image063
以及群組金鑰
Figure 02_image035
產生對應於終端裝置a的成員金鑰
Figure 02_image059
,如方程式(7)所示。
Figure 02_image065
…(7) In one embodiment, the terminal device b can use the public key according to the elliptic curve-based Diffie-Hellman key exchange algorithm
Figure 02_image063
and group key
Figure 02_image035
Generate a member key corresponding to terminal device a
Figure 02_image059
, as shown in equation (7).
Figure 02_image065
…(7)

在一實施例中,終端裝置b可根據基於橢圓曲線迪菲-赫爾曼密鑰交換演算法而根據公鑰

Figure 02_image067
以及群組金鑰
Figure 02_image035
產生對應於終端裝置b的成員金鑰
Figure 02_image061
,如方程式(8)所示。
Figure 02_image069
…(8) In one embodiment, the terminal device b can use the public key according to the elliptic curve-based Diffie-Hellman key exchange algorithm
Figure 02_image067
and group key
Figure 02_image035
Generate a member key corresponding to terminal device b
Figure 02_image061
, as shown in Equation (8).
Figure 02_image069
…(8)

圖5根據本發明的一實施例繪示群組即時通訊程序的訊令圖。在步驟S501中,終端裝置a可對成員金鑰

Figure 02_image059
執行如方程式(9)所示的雜湊訊息鑑別碼(hashed message authentication code,HMAC)運算以產生訊息金鑰
Figure 02_image081
,其中
Figure 02_image083
代表對金鑰k以及常數A執行雜湊訊息鑑別碼運算。
Figure 02_image085
…(9) FIG. 5 illustrates a signaling diagram of a group instant messaging program according to an embodiment of the present invention. In step S501, the terminal device a can register the member key
Figure 02_image059
A hashed message authentication code (HMAC) operation as shown in equation (9) is performed to generate a message key
Figure 02_image081
,in
Figure 02_image083
Represents the hash message authentication code operation performed on the key k and the constant A.
Figure 02_image085
…(9)

在步驟S502中,終端裝置a可根據訊息金鑰

Figure 02_image081
對訊息進行加密以產生加密訊息。具體來說,終端裝置a可對訊息M進行如方程式(10)所示的對稱加密演算法以產生加密訊息CT,其中
Figure 02_image049
代表基於AES演算法使用金鑰k對明文p進行加密。
Figure 02_image087
…(10) In step S502, the terminal device a can use the message key according to the
Figure 02_image081
The message is encrypted to produce an encrypted message. Specifically, the terminal device a can perform the symmetric encryption algorithm shown in equation (10) on the message M to generate the encrypted message CT, wherein
Figure 02_image049
Represents the encryption of plaintext p using key k based on the AES algorithm.
Figure 02_image087
…(10)

在步驟S503中,終端裝置a可傳送加密訊息CT以及金鑰資訊至終端裝置b,其中金鑰資訊可包含例如群組金鑰識別碼

Figure 02_image057
以及成員金鑰世代資訊,其中成員金鑰世代資訊指示當前終端裝置a之成員金鑰
Figure 02_image059
的世代。假設成員金鑰
Figure 02_image059
為終端裝置a的第一世代的成員金鑰,則成員金鑰世代資訊可向終端裝置b指示加密訊息CT是基於終端裝置a的第一世代的成員金鑰
Figure 02_image059
來加密的。因此,終端裝置b應該使用第一世代的成員金鑰
Figure 02_image059
來解密加密訊息CT。 In step S503, the terminal device a may transmit the encrypted message CT and key information to the terminal device b, wherein the key information may include, for example, a group key identifier
Figure 02_image057
and member key generation information, wherein the member key generation information indicates the member key of the current terminal device a
Figure 02_image059
generation. Assume member key
Figure 02_image059
is the member key of the first generation of terminal device a, then the member key generation information can indicate to terminal device b that the encrypted message CT is based on the member key of the first generation of terminal device a
Figure 02_image059
to be encrypted. Therefore, the terminal device b should use the member key of the first generation
Figure 02_image059
to decrypt the encrypted message CT.

在步驟S504中,終端裝置a可對成員金鑰

Figure 02_image059
執行如方程式(11)所示的雜湊訊息鑑別碼運算以更新儲存在終端裝置a中的終端裝置a的成員金鑰的世代,其中
Figure 02_image089
代表對金鑰k以及常數B執行雜湊訊息鑑別碼運算,其中常數B與常數A相異。假設成員金鑰
Figure 02_image059
為終端裝置a的第一世代的成員金鑰,則終端裝置a可更新成員金鑰
Figure 02_image059
以產生終端裝置a的第二世代的成員金鑰
Figure 02_image091
Figure 02_image093
…(11) In step S504, the terminal device a can register the member key
Figure 02_image059
A hash message authentication code operation as shown in Equation (11) is performed to update the generation of the member key of terminal device a stored in terminal device a, where
Figure 02_image089
Represents the hash message authentication code operation performed on the key k and the constant B, where the constant B is different from the constant A. Assume member key
Figure 02_image059
is the member key of the first generation of terminal device a, then terminal device a can update the member key
Figure 02_image059
to generate the member key of the second generation of terminal device a
Figure 02_image091
.
Figure 02_image093
…(11)

此外,終端裝置a可對成員金鑰

Figure 02_image061
執行如方程式(12)所示的雜湊訊息鑑別碼運算以更新儲存在終端裝置a中的終端裝置b的成員金鑰的世代,其中
Figure 02_image089
代表對金鑰k以及常數B執行雜湊訊息鑑別碼運算,其中常數B與常數A相異。假設成員金鑰
Figure 02_image061
為終端裝置b的第一世代的成員金鑰,則終端裝置a可更新成員金鑰
Figure 02_image061
以產生終端裝置b的第二世代的成員金鑰
Figure 02_image095
Figure 02_image097
…(12) In addition, the terminal device a can register the membership key
Figure 02_image061
A hash message authentication code operation as shown in equation (12) is performed to update the generation of the member key of terminal device b stored in terminal device a, where
Figure 02_image089
Represents the hash message authentication code operation performed on the key k and the constant B, where the constant B is different from the constant A. Assume member key
Figure 02_image061
is the member key of the first generation of terminal device b, then terminal device a can update the member key
Figure 02_image061
to generate the member key of the second generation of terminal device b
Figure 02_image095
.
Figure 02_image097
…(12)

在步驟S505中,響應於接收加密訊息CT以及金鑰資訊,終端裝置b可對儲存在終端裝置b中的終端裝置a的成員金鑰

Figure 02_image059
執行如方程式(13)所示的雜湊訊息鑑別碼運算以產生訊息金鑰
Figure 02_image081
,其中
Figure 02_image083
代表對金鑰k以及常數A執行雜湊訊息鑑別碼運算。
Figure 02_image085
…(13) In step S505, in response to receiving the encrypted message CT and the key information, the terminal device b can store the member key of the terminal device a stored in the terminal device b
Figure 02_image059
Perform the hash message authentication code operation as shown in equation (13) to generate the message key
Figure 02_image081
,in
Figure 02_image083
Represents the hash message authentication code operation performed on the key k and the constant A.
Figure 02_image085
…(13)

在步驟S506中,終端裝置b可根據訊息金鑰

Figure 02_image081
對加密訊息CT進行解密以 取得訊息M。具體來說,終端裝置a可對加密訊息CT進行如方程式(14)所示的對稱解密演算法以產生訊息M,其中
Figure 02_image077
代表基於AES演算法使用金鑰k對密文c進行加密。
Figure 02_image099
…(14) In step S506, the terminal device b can use the message key according to the
Figure 02_image081
The encrypted message CT is decrypted to obtain the message M. Specifically, the terminal device a may perform the symmetric decryption algorithm shown in equation (14) on the encrypted message CT to generate the message M, where
Figure 02_image077
Represents the encryption of the ciphertext c with the key k based on the AES algorithm.
Figure 02_image099
…(14)

在步驟S507中,終端裝置b可對成員金鑰

Figure 02_image059
執行如方程式(15)所示的雜湊訊息鑑別碼運算以更新儲存在終端裝置b中的終端裝置a的成員金鑰的世代,其中
Figure 02_image089
代表對金鑰k以及常數B執行雜湊訊息鑑別碼運算。假設成員金鑰
Figure 02_image059
為終端裝置a的第一世代的成員金鑰,則終端裝置b可更新成員金鑰
Figure 02_image059
以產生終端裝置a的第二世代的成員金鑰
Figure 02_image091
Figure 02_image093
…(15) In step S507, the terminal device b can register the member key
Figure 02_image059
A hash message authentication code operation as shown in equation (15) is performed to update the generation of the member key of terminal device a stored in terminal device b, where
Figure 02_image089
Represents the hash message authentication code operation performed on the key k and the constant B. Assume member key
Figure 02_image059
is the member key of the first generation of terminal device a, then terminal device b can update the member key
Figure 02_image059
to generate the member key of the second generation of terminal device a
Figure 02_image091
.
Figure 02_image093
…(15)

此外,終端裝置b可對成員金鑰

Figure 02_image061
執行如方程式(16)所示的雜湊訊息鑑別碼運算以更新儲存在終端裝置b中的終端裝置b的成員金鑰的世代,其中
Figure 02_image089
代表對金鑰k以及常數B執行雜湊訊息鑑別碼運算。假設成員金鑰
Figure 02_image061
為終端裝置b的第一世代的成員金鑰,則終端裝置b可更新成員金鑰
Figure 02_image061
以產生終端裝置b的第二世代的成員金鑰
Figure 02_image095
Figure 02_image097
…(16) In addition, the terminal device b can
Figure 02_image061
A hash message authentication code operation as shown in equation (16) is performed to update the generation of the member key of terminal device b stored in terminal device b, where
Figure 02_image089
Represents the hash message authentication code operation performed on the key k and the constant B. Assume member key
Figure 02_image061
is the member key of the first generation of terminal device b, then terminal device b can update the member key
Figure 02_image061
to generate the member key of the second generation of terminal device b
Figure 02_image095
.
Figure 02_image097
…(16)

圖6根據本發明的一實施例繪示一種群組即時通訊的加密方法的流程圖,其中所述加密方法可由如圖1所示的加密系統實施。在步驟S601中,伺服器通訊連接至第一終端裝置以及第二終端裝置。在步驟S602中,伺服器傳送群組金鑰狀態至第一終端裝置。在步驟S603中,響應於群組金鑰狀態指示第一群組金鑰失效,第一終端裝置基於橢圓曲線密碼學演算法產生第二群組金鑰、臨時公鑰以及對應於臨時公鑰的臨時私鑰。在步驟S604中,第一終端裝置根據第二群組金鑰、臨時私鑰以及對應於第二終端裝置的第二公鑰產生群組金鑰密文。在步驟S605中,響應於自第一終端裝置接收群組金鑰密文,伺服器傳送對應於第二群組金鑰的金鑰資訊至第一終端裝置。在步驟S606中,響應於自伺服器接收金鑰資訊,第一終端裝置根據第二群組金鑰更新對應於第一終端裝置的第一成員金鑰。在步驟S607中,第一終端裝置根據第一成員金鑰與第二終端裝置進行通訊。FIG. 6 is a flowchart illustrating an encryption method for group instant messaging according to an embodiment of the present invention, wherein the encryption method can be implemented by the encryption system shown in FIG. 1 . In step S601, the server is communicatively connected to the first terminal device and the second terminal device. In step S602, the server transmits the group key status to the first terminal device. In step S603, in response to the group key status indicating that the first group key is invalid, the first terminal device generates a second group key, a temporary public key, and a data corresponding to the temporary public key based on an elliptic curve cryptography algorithm Temporary private key. In step S604, the first terminal device generates a group key ciphertext according to the second group key, the temporary private key and the second public key corresponding to the second terminal device. In step S605, in response to receiving the group key ciphertext from the first terminal device, the server transmits key information corresponding to the second group key to the first terminal device. In step S606, in response to receiving the key information from the server, the first terminal device updates the first member key corresponding to the first terminal device according to the second group key. In step S607, the first terminal device communicates with the second terminal device according to the first member key.

綜上所述,本發明之特點及功效可包含:伺服器無直接參與金鑰協商,達到端點加密效果;群組成員異動後仍然具有端點加密保護;降低群組成員數量對效能與安全性的影響(例如:增加群組成員並不會使即時通訊的效能降低);每則訊息金鑰都利用棘輪方式產生確保前向安全;金鑰同步時僅需由一名成員進行,降低金鑰同步複雜度;以及結合數位簽章,確保訊息的完整性與身分認證。To sum up, the features and effects of the present invention may include: the server does not directly participate in the key negotiation, so that the endpoint encryption effect is achieved; the endpoint encryption protection is still available after the group members change; (for example: adding group members does not reduce the performance of instant messaging); each message key is generated using a ratchet method to ensure forward security; key synchronization only needs to be performed by one member, reducing the cost of key synchronization complexity; and combined with digital signatures to ensure message integrity and identity authentication.

本發明可提供下列的安全性:(1)對於成員金鑰與訊息金鑰具有前向安全:金鑰衍生採單向性的雜湊函數,假設第三者能取得到某代之訊息金鑰的情況下,也無法有效逆推回過往的訊息金鑰,同樣的成員金鑰也無法有效逆推回前一世代之金鑰。(2)可確保訊息的完整性與身分認證:本方法中的任何從終端發出的訊息皆針對內容使用數位簽章,同樣的終端接收到的訊息皆先檢查數位簽章後再進行後續動作,達到訊息的完整性與身分認證,有效降低中間人攻擊可能性,並且可減少使用者手動進行確認彼此身分之操作(如:雙方透過面對面確認彼此公鑰指紋),提高可用性與可靠性。(3)成員異動仍保持安全的端點加密通訊:本方法透過伺服器管理群組金鑰狀態,確保任何異動能即時有效的將群組金鑰狀態設為無效,迫使終端於下則訊息使用新的群組金鑰來進行金鑰同步與加密訊息,確保舊成員無法解密接續的新訊息,新成員也無法解密過往的舊訊息。The present invention can provide the following security: (1) Forward security for the member key and the message key: the key is derived using a one-way hash function, assuming that a third party can obtain the message key of a certain generation In this case, the previous message key cannot be effectively reversed, and the same member key cannot be effectively reversed to the previous generation key. (2) It can ensure the integrity of the message and identity authentication: any message sent from the terminal in this method uses a digital signature for the content, and the message received by the same terminal checks the digital signature before performing subsequent actions. Achieve message integrity and identity authentication, effectively reduce the possibility of man-in-the-middle attacks, and reduce users' manual operations to confirm each other's identities (for example, two parties confirm each other's public key fingerprints face-to-face), improving usability and reliability. (3) End-point encrypted communication that still maintains security for member changes: This method manages the group key state through the server to ensure that any change can immediately and effectively invalidate the group key state, forcing the terminal to use the following message The new group key is used for key synchronization and encryption of messages, ensuring that old members cannot decrypt subsequent new messages, and new members cannot decrypt old messages in the past.

10:加密系統 100:伺服器 200:群組 a、b:終端裝置 S201、S202、S203、S204、S301、S302、S303、S304、S401、S402、S403、S404、S405、S406、S407、S408、S409、S501、S502、S503、S504、S505、S506、S507、S601、S602、S603、S604、S605、S606、S607:步驟10: Encryption system 100: Server 200: Group a, b: terminal device S201, S202, S203, S204, S301, S302, S303, S304, S401, S402, S403, S404, S405, S406, S407, S408, S409, S501, S502, S503, S504, S505, S506, S507, S601, S602, S603, S604, S605, S606, S607: Steps

圖1根據本發明的一實施例繪示一種群組即時通訊的加密系統的示意圖。 圖2根據本發明的一實施例繪示註冊程序的訊令圖。 圖3根據本發明的一實施例繪示成員異動程序的訊令圖。 圖4根據本發明的一實施例繪示金鑰同步程序的訊令圖。 圖5根據本發明的一實施例繪示群組即時通訊程序的訊令圖。 圖6根據本發明的一實施例繪示一種群組即時通訊的加密方法的流程圖。 FIG. 1 is a schematic diagram illustrating an encryption system for group instant messaging according to an embodiment of the present invention. FIG. 2 illustrates a signaling diagram of a registration process according to an embodiment of the present invention. FIG. 3 shows a signaling diagram of a member change procedure according to an embodiment of the present invention. FIG. 4 illustrates a signaling diagram of a key synchronization process according to an embodiment of the present invention. FIG. 5 illustrates a signaling diagram of a group instant messaging program according to an embodiment of the present invention. FIG. 6 is a flowchart illustrating an encryption method for group instant messaging according to an embodiment of the present invention.

S601、S602、S603、S604、S605、S606、S607:步驟 S601, S602, S603, S604, S605, S606, S607: Steps

Claims (19)

一種群組即時通訊的加密系統,包括: 第一終端裝置; 第二終端裝置;以及 伺服器,通訊連接至所述第一終端裝置以及所述第二終端裝置,其中 所述伺服器傳送群組金鑰狀態至所述第一終端裝置; 響應於所述群組金鑰狀態指示第一群組金鑰失效,所述第一終端裝置基於橢圓曲線密碼學演算法產生第二群組金鑰、臨時公鑰以及對應於所述臨時公鑰的臨時私鑰; 所述第一終端裝置根據所述第二群組金鑰、所述臨時私鑰以及對應於所述第二終端裝置的第二公鑰產生群組金鑰密文; 響應於自所述第一終端裝置接收所述群組金鑰密文,所述伺服器傳送對應於所述第二群組金鑰的金鑰資訊至所述第一終端裝置; 響應於自所述伺服器接收所述金鑰資訊,所述第一終端裝置根據所述第二群組金鑰更新對應於所述第一終端裝置的第一成員金鑰;以及 所述第一終端裝置根據所述第一成員金鑰與所述第二終端裝置進行通訊。 An encryption system for group instant messaging, comprising: a first terminal device; the second terminal device; and a server, communicatively connected to the first terminal device and the second terminal device, wherein the server transmits the group key status to the first terminal device; In response to the group key status indicating that the first group key is invalid, the first terminal device generates a second group key, a temporary public key, and a temporary public key corresponding to the temporary public key based on an elliptic curve cryptography algorithm temporary private key; generating, by the first terminal device, a group key ciphertext according to the second group key, the temporary private key and the second public key corresponding to the second terminal device; In response to receiving the group key ciphertext from the first terminal device, the server transmits key information corresponding to the second group key to the first terminal device; In response to receiving the key information from the server, the first end device updates a first member key corresponding to the first end device according to the second group key; and The first terminal device communicates with the second terminal device according to the first member key. 如請求項1所述的加密系統,其中 所述第一終端裝置根據所述第二群組金鑰更新儲存在所述第一終端裝置且對應於所述第二終端裝置的所述第二成員金鑰;以及 所述第一終端裝置自所述第二終端裝置接收加密訊息,並且通過所述第二成員金鑰解密所述加密訊息。 The encryption system of claim 1, wherein the first terminal device updates the second member key stored in the first terminal device and corresponding to the second terminal device according to the second group key; and The first terminal device receives an encrypted message from the second terminal device, and decrypts the encrypted message through the second member key. 如請求項1所述的加密系統,其中 所述第一終端裝置根據所述第一成員金鑰產生加密訊息,並且傳送所述加密訊息至所述第二終端裝置。 The encryption system of claim 1, wherein The first terminal device generates an encrypted message according to the first member key, and transmits the encrypted message to the second terminal device. 如請求項1所述的加密系統,其中 所述第一終端裝置基於橢圓曲線迪菲-赫爾曼密鑰交換演算法而根據所述臨時私鑰以及所述第二公鑰產生共享秘密;以及 所述第一終端裝置基於對稱加密演算法而根據所述共享秘密以及所述第二群組金鑰產生所述群組金鑰密文。 The encryption system of claim 1, wherein The first terminal device generates a shared secret according to the temporary private key and the second public key based on an elliptic curve Diffie-Hellman key exchange algorithm; and The first terminal device generates the group key ciphertext according to the shared secret and the second group key based on a symmetric encryption algorithm. 如請求項4所述的加密系統,其中 在執行所述對稱加密演算法之前,所述第一終端裝置對所述共享秘密執行安全雜湊演算法。 The encryption system of claim 4, wherein Before executing the symmetric encryption algorithm, the first terminal device executes a secure hash algorithm on the shared secret. 如請求項4所述的加密系統,其中 所述第二終端裝置自所述伺服器接收所述群組金鑰密文、所述臨時公鑰以及對應於所述第一終端裝置的第一公鑰; 所述第二終端裝置基於所述橢圓曲線迪菲-赫爾曼密鑰交換演算法而根據所述臨時公鑰以及對應於所述第二公鑰的第二私鑰取得所述共享秘密;以及 所述第二終端裝置基於對應於所述對稱加密演算法的對稱解密演算法而根據所述共享秘密以及所述群組金鑰密文取得所述第二群組金鑰。 The encryption system of claim 4, wherein The second terminal device receives the group key ciphertext, the temporary public key and the first public key corresponding to the first terminal device from the server; the second terminal device obtains the shared secret according to the temporary public key and the second private key corresponding to the second public key based on the elliptic curve Diffie-Hellman key exchange algorithm; and The second terminal device obtains the second group key according to the shared secret and the group key ciphertext based on a symmetric decryption algorithm corresponding to the symmetric encryption algorithm. 如請求項6所述的加密系統,其中 在執行所述對稱解密演算法之前,所述第二終端裝置對所述共享秘密執行安全雜湊演算法。 The encryption system of claim 6, wherein Before executing the symmetric decryption algorithm, the second terminal device executes a secure hash algorithm on the shared secret. 如請求項6所述的加密系統,其中 所述第二終端裝置根據所述第二群組金鑰更新儲存在所述第二終端裝置且對應於所述第一終端裝置的所述第一成員金鑰;以及 所述第二終端裝置根據所述第二群組金鑰更新儲存在所述第二終端裝置且對應於所述第二終端裝置的第二成員金鑰。 The encryption system of claim 6, wherein the second terminal device updates the first member key stored in the second terminal device and corresponding to the first terminal device according to the second group key; and The second terminal device updates a second member key stored in the second terminal device and corresponding to the second terminal device according to the second group key. 如請求項6所述的加密系統,其中 所述伺服器響應於所述第二終端裝置登入所述群組即時通訊而傳送所述群組金鑰密文至所述第二終端裝置。 The encryption system of claim 6, wherein The server transmits the group key ciphertext to the second terminal device in response to the second terminal device logging into the group instant messaging. 如請求項3所述的加密系統,其中 所述第一終端裝置對所述第一成員金鑰執行第一雜湊訊息鑑別碼運算以產生第一訊息金鑰;以及 所述第一終端裝置對所述第一成員金鑰執行第二雜湊訊息鑑別碼運算以更新所述第一成員金鑰。 The encryption system of claim 3, wherein the first terminal device performs a first hash message authentication code operation on the first member key to generate a first message key; and The first terminal device performs a second hash message authentication code operation on the first member key to update the first member key. 如請求項10所述的加密系統,其中 所述第一終端裝置對根據所述第一訊息金鑰對訊息進行加密以產生所述加密訊息。 The encryption system of claim 10, wherein The first terminal device encrypts a message according to the first message key to generate the encrypted message. 如請求項10所述的加密系統,其中 所述第二終端裝置自所述第一終端裝置接收所述加密訊息以及金鑰資訊; 響應於接收所述金鑰資訊,所述第二終端裝置對所述第一成員金鑰執行所述第一雜湊訊息鑑別碼運算以取得所述第一訊息金鑰;以及 響應於接收所述金鑰資訊,所述第二終端裝置對所述第一成員金鑰執行所述第二雜湊訊息鑑別碼運算以更新儲存在所述第二終端的所述第一成員金鑰。 The encryption system of claim 10, wherein the second terminal device receives the encrypted message and key information from the first terminal device; In response to receiving the key information, the second terminal device performs the first hash message authentication code operation on the first member key to obtain the first message key; and In response to receiving the key information, the second terminal device performs the second hash message authentication code operation on the first member key to update the first member key stored in the second terminal . 如請求項12所述的加密系統,其中 所述第二終端裝置對根據所述第一訊息金鑰對所述加密訊息進行解密以取得所述訊息。 The encryption system of claim 12, wherein The second terminal device decrypts the encrypted message according to the first message key to obtain the message. 如請求項1所述的加密系統,其中 所述第一終端裝置基於所述橢圓曲線密碼學演算法產生對應於所述第一終端裝置的第一公鑰以及對應於所述第一公鑰的第一私鑰,並且基於公開金鑰密碼學產生憑證以及對應於所述憑證的數位簽章;以及 所述第一終端裝置傳送所述第一公鑰、所述憑證以及所述數位簽章至所述伺服器以註冊加入所述群組即時通訊。 The encryption system of claim 1, wherein The first terminal device generates a first public key corresponding to the first terminal device and a first private key corresponding to the first public key based on the elliptic curve cryptography algorithm, and based on public key cryptography A student-generated credential and a digital signature corresponding to said credential; and The first terminal device transmits the first public key, the certificate and the digital signature to the server to register to join the group instant messaging. 如請求項14所述的加密系統,其中 所述第一終端裝置基於對應於所述橢圓曲線密碼學演算法的定義域產生所述第一公鑰、所述第一私鑰、所述第二群組金鑰、所述臨時公鑰以及所述臨時私鑰。 The encryption system of claim 14, wherein The first terminal device generates the first public key, the first private key, the second group key, the temporary public key, and the the temporary private key. 如請求項1所述的加密系統,其中 所述伺服器自所述群組即時通訊的成員接收異動資訊,並且根據所述異動資訊使所述第一群組金鑰失效。 The encryption system of claim 1, wherein The server receives change information from members of the group instant messaging, and invalidates the first group key according to the change information. 如請求項14所述的加密系統,其中 所述伺服器自所述第一終端裝置接收訊息,其中所述訊息包括所述數位簽章;以及 所述伺服器根據所述憑證驗證所述數位簽章以判斷所述訊息的來源是否正確。 The encryption system of claim 14, wherein the server receives a message from the first terminal device, wherein the message includes the digital signature; and The server verifies the digital signature according to the certificate to determine whether the source of the message is correct. 如請求項14所述的加密系統,其中 所述第二終端裝置自所述第一終端裝置接收訊息,其中所述訊息包括所述數位簽章;以及 所述第二終端裝置根據所述憑證驗證所述數位簽章以判斷所述訊息的來源是否正確。 The encryption system of claim 14, wherein the second terminal device receives a message from the first terminal device, wherein the message includes the digital signature; and The second terminal device verifies the digital signature according to the certificate to determine whether the source of the message is correct. 一種群組即時通訊的加密方法,包括: 伺服器通訊連接至第一終端裝置以及第二終端裝置; 所述伺服器傳送群組金鑰狀態至所述第一終端裝置; 響應於所述群組金鑰狀態指示第一群組金鑰失效,所述第一終端裝置基於橢圓曲線密碼學演算法產生第二群組金鑰、臨時公鑰以及對應於所述臨時公鑰的臨時私鑰; 所述第一終端裝置根據所述第二群組金鑰、所述臨時私鑰以及對應於所述第二終端裝置的第二公鑰產生群組金鑰密文; 響應於自所述第一終端裝置接收所述群組金鑰密文,所述伺服器傳送對應於所述第二群組金鑰的金鑰資訊至所述第一終端裝置; 響應於自所述伺服器接收所述金鑰資訊,所述第一終端裝置根據所述第二群組金鑰更新對應於所述第一終端裝置的第一成員金鑰;以及 所述第一終端裝置根據所述第一成員金鑰與所述第二終端裝置進行通訊。 An encryption method for group instant messaging, comprising: The server is communicatively connected to the first terminal device and the second terminal device; the server transmits the group key status to the first terminal device; In response to the group key status indicating that the first group key is invalid, the first terminal device generates a second group key, a temporary public key, and a temporary public key corresponding to the temporary public key based on an elliptic curve cryptography algorithm temporary private key; generating, by the first terminal device, a group key ciphertext according to the second group key, the temporary private key and the second public key corresponding to the second terminal device; In response to receiving the group key ciphertext from the first terminal device, the server transmits key information corresponding to the second group key to the first terminal device; In response to receiving the key information from the server, the first end device updates a first member key corresponding to the first end device according to the second group key; and The first terminal device communicates with the second terminal device according to the first member key.
TW110123849A 2021-06-29 2021-06-29 Encryption system and encryption method for group instant massaging TWI761243B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW110123849A TWI761243B (en) 2021-06-29 2021-06-29 Encryption system and encryption method for group instant massaging

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW110123849A TWI761243B (en) 2021-06-29 2021-06-29 Encryption system and encryption method for group instant massaging

Publications (2)

Publication Number Publication Date
TWI761243B true TWI761243B (en) 2022-04-11
TW202301830A TW202301830A (en) 2023-01-01

Family

ID=82199236

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110123849A TWI761243B (en) 2021-06-29 2021-06-29 Encryption system and encryption method for group instant massaging

Country Status (1)

Country Link
TW (1) TWI761243B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201840159A (en) * 2017-04-07 2018-11-01 安地卡及巴布達商區塊鏈控股有限公司 Method and system for secure data record distribution using a blockchain
TW201921887A (en) * 2017-08-23 2019-06-01 安地卡及巴布達商區塊鏈控股有限公司 Computer-implemented system and method for highly secure, high speed encryption and transmission of data
TWI717071B (en) * 2019-10-25 2021-01-21 中華電信股份有限公司 Certificate management system and method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201840159A (en) * 2017-04-07 2018-11-01 安地卡及巴布達商區塊鏈控股有限公司 Method and system for secure data record distribution using a blockchain
TW201921887A (en) * 2017-08-23 2019-06-01 安地卡及巴布達商區塊鏈控股有限公司 Computer-implemented system and method for highly secure, high speed encryption and transmission of data
TWI717071B (en) * 2019-10-25 2021-01-21 中華電信股份有限公司 Certificate management system and method thereof

Also Published As

Publication number Publication date
TW202301830A (en) 2023-01-01

Similar Documents

Publication Publication Date Title
TWI748853B (en) Secure multiparty loss resistant storage and transfer of cryptographic keys for blockchain based systems in conjunction with a wallet management system
US7814320B2 (en) Cryptographic authentication, and/or establishment of shared cryptographic keys, using a signing key encrypted with a non-one-time-pad encryption, including (but not limited to) techniques with improved security against malleability attacks
CN108599925B (en) Improved AKA identity authentication system and method based on quantum communication network
US8670563B2 (en) System and method for designing secure client-server communication protocols based on certificateless public key infrastructure
US20170244687A1 (en) Techniques for confidential delivery of random data over a network
EP2416524B1 (en) System and method for secure transaction of data between wireless communication device and server
US20170223008A1 (en) System and method for generating a server-assisted strong password from a weak secret
Toorani et al. An elliptic curve-based signcryption scheme with forward secrecy
CN110048849B (en) Multi-layer protection session key negotiation method
US11870891B2 (en) Certificateless public key encryption using pairings
CN110020524B (en) Bidirectional authentication method based on smart card
US9130744B1 (en) Sending an encrypted key pair and a secret shared by two devices to a trusted intermediary
US11438316B2 (en) Sharing encrypted items with participants verification
JP2004364303A (en) Method and system for establishing link key for encrypting and decrypting messages
JP2017163612A (en) Terminal authentication system, server device, and terminal authentication method
CN110999202A (en) Computer-implemented system and method for highly secure, high-speed encryption and transmission of data
US10630466B1 (en) Apparatus and method for exchanging cryptographic information with reduced overhead and latency
KR101704540B1 (en) A method of managing group keys for sharing data between multiple devices in M2M environment
GB2589390A (en) Methods of generating a key and a communication method
KR101014849B1 (en) Method for mutual authenticating and key exchanging to Public Key without trusted third party and apparatus thereof
JP4924943B2 (en) Authenticated key exchange system, authenticated key exchange method and program
JP4615128B2 (en) Voice and data encryption method using encryption key split combiner
CN116455561A (en) Embedded TLS protocol for lightweight devices
TWI761243B (en) Encryption system and encryption method for group instant massaging
CN113918971A (en) Block chain based message transmission method, device, equipment and readable storage medium