Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java Security  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 如何解决用户口令加密安全传输问题?
alicecyh





发贴: 13
积分: 0
于 2004-03-11 11:18 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我做的jsp网站,在系统的登录页面中,用户在客户端输入“姓名”和“密码”后,服务器用request函数获得,从客户端到服务器的中间传送过程是用明文在网络上传送的。这个中间明文的传送过程是不安全的,攻击者可以从中间截获明文。这个问题怎么解决呢?
我想在客户端用APPLET对“姓名”和“密码”作加密处理后再传到服务器,不过APPLET效率好像不高。这个方法好像不太可行。有没有别的解决方案呢?
请教各位!



作者 Re:如何解决用户口令加密安全传输问题? [Re:alicecyh]
Jove



CJSDN高级会员


发贴: 1228
积分: 194
于 2004-03-11 13:40 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
https吧


作者 Re:如何解决用户口令加密安全传输问题? [Re:alicecyh]
alicecyh





发贴: 13
积分: 0
于 2004-03-11 14:00 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
谢谢大侠指教:)


作者 Re:如何解决用户口令加密安全传输问题? [Re:alicecyh]
Wendy0007





发贴: 120
积分: 0
于 2004-04-06 11:06 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
没用过https,使用https后servlet要做什么处理吗??


作者 Re:如何解决用户口令加密安全传输问题? [Re:alicecyh]
menzy



版主


发贴: 754
积分: 113
于 2004-04-06 17:29 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
没有特殊处理
HTTPS是传输层加密,基于WEB的内容是应用层的东西,两个基本不搭边。



作者 Re:如何解决用户口令加密安全传输问题? [Re:menzy]
Jove



CJSDN高级会员


发贴: 1228
积分: 194
于 2004-04-06 19:21 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
从OSI 7层结构来说,HTTPS也是应用层的吧,他也是基于Socket的


作者 Re:如何解决用户口令加密安全传输问题? [Re:alicecyh]
airskys





发贴: 9
积分: 0
于 2004-04-15 15:45 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
https的东西就不能给截获破译了吗

他用的是什么加密方法呢?



作者 Re:如何解决用户口令加密安全传输问题? [Re:alicecyh]
kingyz



发贴: 0
积分: 0
于 2004-04-16 14:21 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
不会呀,ie6本身就是128位加密的呀!
你只要不是通过 url+?+参数的方式,而通过jsp的指令<jsp:param>或者通过表单<form>post方式来传递参数是不会为明文的呀!



作者 Re:如何解决用户口令加密安全传输问题? [Re:alicecyh]
menzy



版主


发贴: 754
积分: 113
于 2004-04-16 15:00 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
HTTPS连接请求,实际上是用SSL与服务器建立连接,SSL是网络层的东西,所以说采用HTTPS和所传输的内容不搭边


作者 Re:如何解决用户口令加密安全传输问题? [Re:alicecyh]
wjiyong





发贴: 41
积分: 10
于 2004-04-18 22:09 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
thasnkk


作者 Re:如何解决用户口令加密安全传输问题? [Re:alicecyh]
Wendy0007





发贴: 120
积分: 0
于 2004-04-22 23:26 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
谢谢各位的热心解答^_^
学习……



作者 Re:如何解决用户口令加密安全传输问题? [Re:alicecyh]
wuliang





发贴: 46
积分: 20
于 2004-04-30 10:07 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
J2EE 1.4规格中指定必须实现三种登录方式
basic,form,SSL双向认证
basic,form都是基于http协议的,form支持登录页面的定制,两者都是用base64编码传输(不是加密,ie6支持128bit只说明支持,不表示什么传输都经过128bit的加密)
把form方式的登录页面,和action方法放在配了SSL的web容器里(体现在登录页面由https开头,HTTP over SSL),传输就会经过SSL加密了
开发是没有区别的,只需对web容器的SSL配置,客户端也没什么区别,只是登录时会弹出对话框,看到服务器证书的信息
SSL是基于不对称加密的,所以配置SSL有安装证书的步骤,
上面说的只用到了服务端证书,因为证书由第三方发布,所以客户端看到证书可以信任服务器的身份,J2EE规格的第三种登录方式,要求客户端也提供证书,实现双向认证,这种情况,客户端在机器上安装了客户证书,所以不需要手动的登录过程,而且,因为可以用客户证书标识自己,会话机制也和session机制不同

呵呵,这是我的理解,其实ssl我都没配过,不知道说的对不对:)



作者 Re:如何解决用户口令加密安全传输问题? [Re:alicecyh]
nessus2003



发贴: 0
积分: 0
于 2004-05-20 17:09 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
ssl不是免费的吧?


作者 Re:如何解决用户口令加密安全传输问题? [Re:alicecyh]
frankmeng



发贴: 0
积分: 0
于 2004-05-24 00:12 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
如只是为了密码的加密传输,不涉及其他信息的加密传输,可以考虑使用MessageDigest

Message Digest 根据输入的信息,生成一个相当于指纹的位串。因为是一个单向的不可逆的过程,所以可以用来对密码进行验证。方法如下:

1. 新用户注册输入密码时,使用MeaageDigest算法从密码(password1)生成messageDigest1, 并把messge digest存入DB或LDAP目录等持久性存储;

2. 老用户登录输入密码时,使用相同的算法从密码(password2)生成messageDigest2

3. 比较messageDigest1和messageDigest2。如果相同则密码正确,否则密码不正确。

下面的Message digest 代码示例从字符串"This is a test!"生成Digest: D93,.x2%$kd8xdp3di5*

Message digest 代码示例
===============

import java.security.*;
import javax.crypto.*;
//
// Generate a Message Digest
public class MessageDigestExample {

public static void main (String[] args) throws Exception {
//
// check args and get plaintext
if (args.length !=1) {

System.err.println("Usage: java MessageDigestExample text");
System.exit(1);
}
byte[] plainText = args[0].getBytes("UTF8");
//
// get a message digest object using the MD5 algorithm
MessageDigest messageDigest = MessageDigest.getInstance("MD5");
//
// print out the provider used
System.out.println( "\n" + messageDigest.getProvider().getInfo() );
//
// calculate the digest and print it out
messageDigest.update( plainText);
System.out.println( "\nDigest: " );
System.out.println( new String( messageDigest.digest(), "UTF8") );
}
}

运行结果:
D:\>java MessageDigestExample "This is a test!"

SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests
; SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator
; PKIX CertPathBuilder; LDAP, Collection CertStores)

Digest:
D93,.x2%$kd8xdp3di5*




flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923