CN106789004A - 一种高效安全的网络通信方法 - Google Patents

一种高效安全的网络通信方法 Download PDF

Info

Publication number
CN106789004A
CN106789004A CN201611157730.8A CN201611157730A CN106789004A CN 106789004 A CN106789004 A CN 106789004A CN 201611157730 A CN201611157730 A CN 201611157730A CN 106789004 A CN106789004 A CN 106789004A
Authority
CN
China
Prior art keywords
certificate
base64
service end
ciphertext
carried out
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.)
Withdrawn
Application number
CN201611157730.8A
Other languages
English (en)
Inventor
张志江
杨松
季统凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
G Cloud Technology Co Ltd
Original Assignee
G Cloud Technology Co Ltd
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 G Cloud Technology Co Ltd filed Critical G Cloud Technology Co Ltd
Priority to CN201611157730.8A priority Critical patent/CN106789004A/zh
Publication of CN106789004A publication Critical patent/CN106789004A/zh
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network 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
    • H04L63/0442Network 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 wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network 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
    • H04L63/0478Network 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 applying multiple layers of encryption, e.g. nested tunnels or encrypting the content with a first key and then with at least a second key
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0815Network architectures or network communication protocols for network security for authentication of entities providing single-sign-on or federations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0823Network architectures or network communication protocols for network security for authentication of entities using certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key 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)
    • H04L9/0822Key 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) using key encryption key
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key 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)
    • H04L9/0825Key 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) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明涉及服务端与客户端传输信息安全领域,特别是一种高效安全的网络通信方法。本发明首先是通过用户登陆成功之后生成一串有生存时间的证书,然后客户端先对要传输的内容、证书和当前时间戳进行加密,加密后的密文再进行压缩,最后对压缩后的密文进行URL安全的Base64编码,发送到服务端,服务端接收之后,先进行URL安全的Base64解码,再解压和解密,获取到证书之后,对证书进行校验,校验成功之后,再对时间戳进行判断是否已经请求,如果没有请求,则记录改时间戳到服务器上,防止请求重复提交。本发明解决了客户发送信息安全和传输大信息量问题;可以用于服务端与客户端传输信息。

Description

一种高效安全的网络通信方法
技术领域
本发明涉及服务端与客户端传输信息安全领域,特别是一种高效安全的网络通信方法。
背景技术
随着互联网技术日益发展,手机应用软件越来越多,自然而然带来了很多网络信息传输问题:
一是客户手机上数据在网络传输过程中有可能被截取,并且盗用客户信息;
二是客户通信内容有可能是特殊字符,带来通信乱码问题;
三是客户信息内容多,会导致给客户带来大量网络流量和通信慢的问题;
为了解决高效网络通信问题,需要一种高效安全的网络通信的方法,从而解决信息通信安全问题,信息量大导致的流量问题等。
发明内容
本发明解决的技术问题在于提供一种高效安全的网络通信方法;解决客户发送信息安全和传输大信息量问题,也提防了客户非法请求和重复提交,确保了客户信息不受泄露,高效通信,提高系统的可靠性。
本发明解决上述技术问题的技术方案是:
所述的方法是用户登陆成功之后生成一串有生存时间的证书,客户端先对要传输的内容、证书和当前时间戳进行加密,加密后的密文再进行压缩,最后对压缩后的密文进行URL安全的Base64编码,再发送到服务端;服务端接收之后,先进行URL安全的Base64解码,再解压和解密,获取到证书之后,对证书进行校验,校验成功之后,再对时间戳进行判断是否已经请求,如果没有请求,则记录改时间戳到服务器上,防止请求重复提交。
所述的方法包括如下具体步骤:
步骤1:客户登录认证获取证书字符串;
步骤2:通过DES的私钥加密信息内容、证书和当前时间戳;
步骤3:通过RSA的公钥加密DES的私钥;
步骤4:将信息密文和私钥密文进行GZIP压缩;
步骤5:进行URL安全的Base64编码;
步骤6:发送到服务端;
步骤7:服务端将密文进行GZIP解压;
步骤8:进行URL安全的Base64解码;
步骤9:通过服务端RSA私钥解密DES私钥密文;
步骤10:通过DES私钥解密信息密文;
步骤11:校验证书是否有效,证书无效则结束;
步骤12:根据证书和时间戳判断接口是否重复提交,如果是则请求无效结束;
步骤13:记录改时间戳到数据库上;
步骤14:请求完成。
所述证书字符串是基于redis缓存机制的key,并且该key带有生存时间;
所述DES是一种使用密钥加密的对称加密算法,通过私钥可以进行加密和解密;
所述RSA是一种公钥加密算法,是一种非对称加密算法,通过公钥进行加密,然后再通过私钥进行解密;
所述GZIP是一个GNU自由软件的文件压缩程序,可以对字符串进行压缩;
所述URL安全的Base64是将二进制转码成可见字符方便进行http传输,base64转码时会生成″+″,″/″,″=″这些被URL进行转码的特殊字符,URL安全的Base64可以将编码中的″-″,″_″字符串转换成″+″,″/″,字符串长度余4倍的位补″=″;
所述时间戳是通常是一个字符序列,唯一地标识某一刻的时间。
本发明通过在客户端对内容进行用户认证,多重加密,编码,压缩来实现高效和安全的网络通信。本发明给当前飞速发展的互联网通信提供有力支持,与目前市场上的系统提供的单一加密算法比较起来,本发明提供了接口的时效性,信息的安全性,传输的高效性,更好地适应当前互联网传输步伐,为以后更高速的网络传输打下坚实的基础。本发明解决了客户发送信息安全和传输大信息量问题,也提防了客户非法请求和重复提交,确保了客户信息不受泄露,高效通信,提高系统的可靠性,增大了信息传输安全性。
附图说明
下面结合附图对本发明进一步说明:
图1为本发明方法流程图。
具体实施方式
如图1所示,本发明的是用户登陆成功之后生成一串有生存时间的证书,客户端先对要传输的内容、证书和当前时间戳进行加密,加密后的密文再进行压缩,最后对压缩后的密文进行URL安全的Base64编码,再发送到服务端;服务端接收之后,先进行URL安全的Base64解码,再解压和解密,获取到证书之后,对证书进行校验,校验成功之后,再对时间戳进行判断是否已经请求,如果没有请求,则记录改时间戳到服务器上,防止请求重复提交。具体包括如下步骤:
步骤1:客户登录认证获取证书字符串;
步骤2:通过DES的私钥加密信息内容、证书和当前时间戳;
步骤3:通过RSA的公钥加密DES的私钥;
步骤4:将信息密文和私钥密文进行GZIP压缩;
步骤5:进行URL安全的Base64编码;
步骤6:发送到服务端;
步骤7:服务端将密文进行GZIP解压;
步骤8:进行URL安全的Base64解码;
步骤9:通过服务端RSA私钥解密DES私钥密文;
步骤10:通过DES私钥解密信息密文;
步骤11:校验证书是否有效,证书无效则结束;
步骤12:根据证书和时间戳判断接口是否重复提交,如果是则请求无效结束;
步骤13:记录改时间戳到数据库上;
步骤14:请求完成。
各关键部分的代码如下:
获取服务端解密代码:
Base64解密代码:
DES解密代码:
RSA解密代码:
GZIP数据解压缩代码:
public static byte[]decompress(byte[]data)throws IOException{
ByteArrayInputStream bais=new ByteArrayInputStream(data);
ByteArrayOutputStream baos=new ByteArrayOutputstream();
decompress(bais,baos);
data=baos.toByteArray();
baos.flush();
baos.close();
bais.close();
return data;
}。

Claims (3)

1.一种高效安全的网络通信的方法,其特征在于:所述的方法是用户登陆成功之后生成一串有生存时间的证书,客户端先对要传输的内容、证书和当前时间戳进行加密,加密后的密文再进行压缩,最后对压缩后的密文进行URL安全的Base64编码,再发送到服务端;服务端接收之后,先进行URL安全的Base64解码,再解压和解密,获取到证书之后,对证书进行校验,校验成功之后,再对时间戳进行判断是否已经请求,如果没有请求,则记录改时间戳到服务器上,防止请求重复提交。
2.根据权利要求1所述的方法,其特征在于:所述的方法包括如下具体步骤:
步骤1:客户登录认证获取证书字符串;
步骤2:通过DES的私钥加密信息内容、证书和当前时间戳;
步骤3:通过RSA的公钥加密DES的私钥;
步骤4:将信息密文和私钥密文进行GZIP压缩;
步骤5:进行URL安全的Base64编码;
步骤6:发送到服务端;
步骤7:服务端将密文进行GZIP解压;
步骤8:进行URL安全的Base64解码;
步骤9:通过服务端RSA私钥解密DES私钥密文;
步骤10:通过DES私钥解密信息密文;
步骤11:校验证书是否有效,证书无效则结束;
步骤12:根据证书和时间戳判断接口是否重复提交,如果是则请求无效结束;
步骤13:记录改时间戳到数据库上;
步骤14:请求完成。
3.根据权利要求2所述的方法,其特征在于:
所述证书字符串是基于redis缓存机制的key,并且该key带有生存时间;
所述DES是一种使用密钥加密的对称加密算法,通过私钥可以进行加密和解密;
所述RSA是一种公钥加密算法,是一种非对称加密算法,通过公钥进行加密,然后再通过私钥进行解密;
所述GZIP是一个GNU自由软件的文件压缩程序,可以对字符串进行压缩;
所述URL安全的Base64是将二进制转码成可见字符方便进行http传输,base64转码时会生成″+″,″/″,″=″这些被URL进行转码的特殊字符,URL安全的Base64可以将编码中的″-″,″_″字符串转换成″+″,″/″,字符串长度余4倍的位补″=″;
所述时间戳是通常是一个字符序列,唯一地标识某一刻的时间。
CN201611157730.8A 2016-12-15 2016-12-15 一种高效安全的网络通信方法 Withdrawn CN106789004A (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611157730.8A CN106789004A (zh) 2016-12-15 2016-12-15 一种高效安全的网络通信方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611157730.8A CN106789004A (zh) 2016-12-15 2016-12-15 一种高效安全的网络通信方法

Publications (1)

Publication Number Publication Date
CN106789004A true CN106789004A (zh) 2017-05-31

Family

ID=58888344

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611157730.8A Withdrawn CN106789004A (zh) 2016-12-15 2016-12-15 一种高效安全的网络通信方法

Country Status (1)

Country Link
CN (1) CN106789004A (zh)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107800819A (zh) * 2017-11-17 2018-03-13 深圳市泉眼网络科技有限公司 一种文件标识的生成方法、装置和服务器
CN107846422A (zh) * 2017-12-22 2018-03-27 福建星网智慧软件有限公司 一种网关的配置文件加密压缩和解密解压缩的方法
CN108055127A (zh) * 2017-12-14 2018-05-18 吉旗(成都)科技有限公司 计算与数据分离支持热更新加密算法和密钥数据加密方法
CN109327830A (zh) * 2018-11-27 2019-02-12 上海钧正网络科技有限公司 一种蓝牙传输指令的方法、设备端以及蓝牙控制系统
CN109905243A (zh) * 2017-12-11 2019-06-18 航天信息股份有限公司 一种处理数字证书更新请求的方法及服务器
CN110610075A (zh) * 2019-08-22 2019-12-24 苏州浪潮智能科技有限公司 一种双因子证书管理系统及方法
CN112491832A (zh) * 2020-11-16 2021-03-12 中国银联股份有限公司 一种文件传输方法及装置
CN113032810A (zh) * 2021-04-07 2021-06-25 工银科技有限公司 信息处理方法、装置、电子设备、介质和程序产品
CN113271108A (zh) * 2021-05-25 2021-08-17 上海众言网络科技有限公司 问卷答题数据传输方法及装置
WO2022105566A1 (zh) * 2020-11-18 2022-05-27 深圳前海微众银行股份有限公司 一种生成服务请求的方法及装置
CN114979066A (zh) * 2022-05-10 2022-08-30 民商数字科技(深圳)有限公司 基于证书的设备id生成方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431415A (zh) * 2008-12-12 2009-05-13 天柏宽带网络科技(北京)有限公司 一种双向认证的方法
CN101562516A (zh) * 2008-04-15 2009-10-21 华为技术有限公司 数据同步方法、客户端、服务器及系统
US8019989B2 (en) * 2003-06-06 2011-09-13 Hewlett-Packard Development Company, L.P. Public-key infrastructure in network management
CN102780698A (zh) * 2012-07-24 2012-11-14 南京邮电大学 物联网平台中用户终端安全通信的方法
CN104753881A (zh) * 2013-12-30 2015-07-01 上海格尔软件股份有限公司 一种基于软件数字证书和时间戳的WebService安全认证访问控制方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8019989B2 (en) * 2003-06-06 2011-09-13 Hewlett-Packard Development Company, L.P. Public-key infrastructure in network management
CN101562516A (zh) * 2008-04-15 2009-10-21 华为技术有限公司 数据同步方法、客户端、服务器及系统
CN101431415A (zh) * 2008-12-12 2009-05-13 天柏宽带网络科技(北京)有限公司 一种双向认证的方法
CN102780698A (zh) * 2012-07-24 2012-11-14 南京邮电大学 物联网平台中用户终端安全通信的方法
CN104753881A (zh) * 2013-12-30 2015-07-01 上海格尔软件股份有限公司 一种基于软件数字证书和时间戳的WebService安全认证访问控制方法

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107800819A (zh) * 2017-11-17 2018-03-13 深圳市泉眼网络科技有限公司 一种文件标识的生成方法、装置和服务器
CN109905243A (zh) * 2017-12-11 2019-06-18 航天信息股份有限公司 一种处理数字证书更新请求的方法及服务器
CN108055127A (zh) * 2017-12-14 2018-05-18 吉旗(成都)科技有限公司 计算与数据分离支持热更新加密算法和密钥数据加密方法
CN107846422A (zh) * 2017-12-22 2018-03-27 福建星网智慧软件有限公司 一种网关的配置文件加密压缩和解密解压缩的方法
CN109327830A (zh) * 2018-11-27 2019-02-12 上海钧正网络科技有限公司 一种蓝牙传输指令的方法、设备端以及蓝牙控制系统
CN110610075A (zh) * 2019-08-22 2019-12-24 苏州浪潮智能科技有限公司 一种双因子证书管理系统及方法
CN112491832A (zh) * 2020-11-16 2021-03-12 中国银联股份有限公司 一种文件传输方法及装置
CN112491832B (zh) * 2020-11-16 2023-12-05 中国银联股份有限公司 一种文件传输方法及装置
WO2022105566A1 (zh) * 2020-11-18 2022-05-27 深圳前海微众银行股份有限公司 一种生成服务请求的方法及装置
CN113032810A (zh) * 2021-04-07 2021-06-25 工银科技有限公司 信息处理方法、装置、电子设备、介质和程序产品
CN113271108A (zh) * 2021-05-25 2021-08-17 上海众言网络科技有限公司 问卷答题数据传输方法及装置
CN114979066A (zh) * 2022-05-10 2022-08-30 民商数字科技(深圳)有限公司 基于证书的设备id生成方法

Similar Documents

Publication Publication Date Title
CN106789004A (zh) 一种高效安全的网络通信方法
CN1204723C (zh) 通过安全的代码转换进行网络化的信息散布的方法和装置
US8447969B2 (en) Transfer device for sensitive material such as a cryptographic key
CN101420297B (zh) 协商密钥的方法和系统
US9473308B2 (en) Method and system for implementing digital signature in mobile operating system
CN103281193B (zh) 身份认证方法、系统及基于其的数据传输方法、装置
HU223910B1 (hu) Eljárás információadat továbbítására küldőtől fogadóhoz átkódolón keresztül, eljárás információadat átkódolására, eljárás átkódolt információadat fogadására, küldő, fogadó és átkódoló
CN101127604A (zh) 信息安全传输方法和系统
CN103209389B (zh) 短信推送方法、短信推送系统及短信推送云端服务器
CN106254336A (zh) 一种基于文件映射加密的文件传输方法
CN101562516A (zh) 数据同步方法、客户端、服务器及系统
CN103108245B (zh) 一种智能电视支付密钥系统以及基于智能电视的支付方法
CN209545761U (zh) 显示屏监控系统
CN116074039A (zh) 基于https协议的文件安全传输方法及系统
CN102624892B (zh) 一种防止外挂客户端模拟http请求的方法
CN1496644A (zh) 用于从个人掌上计算机到万维网终端的无线传输的加密系统
CN112583807A (zh) 一种验证方法、装置、电子设备及存储介质
CN101141278A (zh) 数据传输系统、数据发送方法、数据处理方法及相应装置
CN113992401B (zh) 数据处理方法和装置
CN104506530A (zh) 一种网络数据处理方法及装置、数据发送方法及装置
CN112184967A (zh) 一种配电网箱开锁方法及系统
CN111818026A (zh) 一种用于公网传输的数据加密方法及系统
CN101924632B (zh) 一种分路加密传输交易信息的可靠传递方法
CN110392016B (zh) 防止流量被劫持的方法、装置和系统
Suresh et al. Separable reversible data hiding using Rc4 algorithm

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20170531

WW01 Invention patent application withdrawn after publication