[任务书+论文+PPT+源码]基于Android与多媒体的英文学习APP的设计与实现
毕业设计(论文)任务书
第1页
毕业设计(论文)题目:基于Android与多媒体技术的英文学习APP的设计与实现设计(论文)要求及原始数据(资料):1.综述国内外移动互联现状及前景;2.了解Android系统,理解Android应用程序的开发方法和步骤;3.分析该Android应用程序的模块结构和主要算法;4.熟悉开发工具的使用,完成代码编写和测试;5.训练检索文献资料和利用文献资料的能力;6.训练撰写技术文档与学位论文的能力。
第2页
毕业设计(论文)主要内容:1.综述国内外移动互联网发展现状及前景;2. 综述分析“有道英语”的可行性及具体需求;3. 综述“有道英语”APP的总体设计框架;4. 深入剖析“有道英语”APP详细设计过程中所用的关键技术; 7. 测试“有道英语”APP的各个模块的运行情况及功能模块是否基本符合要求; 8. 分析并总结“有道英语”APP存在的不足之处,最后对指导老师表达致谢 学生应交出的设计文件(论文):1.内容完整、层次清晰、叙述流畅、排版规范的毕业设计论文;2.包括毕业设计论文、源程序等内容在内的毕业设计电子文档及其它相关材料
第3页
主要参考文献(资料):商陆民,朱丹群,周然,邢海荣. 多功能电子词典软件设计[J]. 东南大学电子工程系,1995任桢.电子词典的设计研究[J]. 华中科技大学,2003黄艺锋,闫巧.基于Android平台电子词典的设计与实现[J].深圳大学计算机与软件学院,2011朱婷婷,李惠.基于Android的应用软件的综述[J] .浙江师范大学数理信息学院,2011邵明博.基于智能手机的大学英语移动学习平台研究[D]. 华中师范大学,2011尹京华,王华军 .基于Android开发的数据存储[J]. 成都理工大学信息科学与技术,2012刘锐.Android开发的性能优化[D]. 新华网股有限公司,2009Serguei A.Mokhovᄃ,Mashrur Mia.A UI Design Case Study and a Prototype of a Travel Search Engine.Scientific American,2010J.MANI BHARATHI, S.Hemalatha, V.AISHWARYA .Advancement in Mobile Communication using Android .International Journal of Computer Applications, 2010, Vol.1 (7)Code Home.Android-An Open Handest Alliance Project.Future Generation Computer Systems,2011


目 录
1 绪论11
1.1 项目背景11
1.2 论文主要工作22
2 项目相关技术介绍与分析44
2.1 Android的发展和历史44
2.2 Android体系结构55
2.2.1 Application(应用层)55
2.2.2 Application Framework(应用框架层)55
2.2.3 Libraries(系统运行库层)55
2.2.4 Linux Kernel(Linux内核层)66
2.3 Android开发环境与工具66
2.3.1 搭建Android开发环境66
2.3.2 Android开发工具介绍1111
2.4 环境说明1111
2.4.1 编程环境1111
2.4.2 运行环境1111
3 项目可行性分析1212
3.1 可行性研究1212
3.1.1 技术可行性1212
3.1.2 经济可行性1212
3.1.3 操作可行性1212
4 项目需求分析与总体设计1313
4.1 需求分析1313
4.1.1 功能性需求分析1313
4.1.2 非功能性需求分析1313
4.2 系统总体设计及模块划分1313
4.2.1 模块划分1313
4.2.2 系统操作流程图1414
4.3 数据库设计及数据操作1515
4.3.1 数据库概念设计1616
4.3.2 数据库逻辑设计1717
4.3.3 数据库的创建1717
4.3.4 数据库的操作1717
4.3.5 数据的查看1717
5 系统的详细设计与实现1919
5.1 系统主界面的设计1919
5.2 查询模块详细设计:2020
5.2.1 调用有道翻译API20API20API20
5.2.2 Json数据解析2121
5.3 发现模块详细设计2222
5.4 我的模块2727
6 系统的测试2929
6.1 程序的测试2929
6.1.1 欢迎界面3030
6.1.2 主界面3131
6.1.3 “词典”以及“翻译”模块3232
6.1.4 “发现”模块测试3636
6.1.5 “我的”模块测试3737
6.2 测试结果说明3838
致谢4040
参考文献4141
外文文献4242
1 绪论
1.1 项目背景
随着全球化地球村时代的到来,英语成为全球化的基础交流语言,想要走出国门走向世界,英语成为每一位追梦人的必跨门槛。它对于希望拥有更宽视野的人来说,必不可少社会生活的信息化和经济的全球化,使英语的重要性日益突出。英语作为最重要的信息载体之一,已成为人类生活各个领域中使用最广泛的语言,英语能力已成为一种必备技能。学生若能学得一种外语能力,就能帮他打开进入另一个世界的学习之门,最后达成多元学习与价值的目标。从全世界来看,说英语的人数已经超过了任何语言的人数,英语在45个国家是官方语言,世界三分之一的人口讲英语,75%的电视节目是英语,四分之三的邮件是用英语书写,电脑键盘是英语键盘,任何一个会议敢号称是国际会议,其会议语言一定要用英语。此外,外贸行业也把英语作为通用语言,外贸交往、国际礼仪、书信函电、进出口文件、还有银行文件语言等,统统以英语作为标准通用语言。大多数国家的高等学府,大学院校,都开设英语语言文学专业,仅在中国,就有数百所大学设有英语专业或英语相关专业。电脑和互联网也是建立在英语的基础上,这个行业的语言,就是英语,另外,在医学领域、建筑领域、文学领域,都与英语有极大的关联。
在Twitter与Facebook出现之前,当Google还只是一个想法的时候,手机只是足够小的便携式电话,能够放在一个公文包中,电池足够用上几个小时,虽然没有多余的功能,但是手机确实使人们可以不通过物理通信线路就能自由通信。
现在、小巧、时尚而且功能强大的手机已经相当普及并且不可或缺。硬件的发展使手机在拥有更大更亮的屏幕和越来越多的外围设备的同时也变的更加小巧和高效。
作为一款Linux内核的操作系统,android系统因其移植性、跨平台性以及开放性被广大移动终端广泛使用。它涵盖移动信息设备工作所需的全部软件,包括操作系统、用户界面和应用程序。Android系统不但可以应用于智能手机,在平板电脑市场也在急速扩张。Android正在逐渐成为目前移动信息设备应用程序开发的最主要的平台。
移动互联网(MobileInternet, 简称MI)是一种通过智能移动终端,采用移动无线通信方式获取业务和服务的新兴业务,包含终端、软件和应用三个层面。终端层包括智能手机、平板电脑、电子书、MID等;软件包括操作系统、中间件、数据库和安全软件等。应用层包括休闲娱乐类、工具媒体类、商务财经类等不同应用与服务。随着技术和产业的发展,未来,LTE(长期演进,4G通信技术标准之一)和NFC(近场通信,移动支付的支撑技术)等网络传输层关键技术也将被纳入移动互联网的范畴之内。
移动互联网的多媒体信息中的应用。随着科技的进步,多媒体服务的移动用户将成为主要趋势,移动通信的发展在未来的十年。无线技术仍然在高速发展,未来空中接口的带宽不断增加,手持终端的功能将不断完善和提高,各种移动应用的发展开辟了广阔的空间。第二代数字移动通信系统发展到第三代移动通信系统是必然的趋势。移动终端用户对移动数据业务的强烈需求,和运营商也要提供更多的增值服务的设备。移动互联网的发展,需要满足统一的IP核心网的战略要求,为移动数据通信的需要移动的主要移动互联网市场。人们可以使用一些强大的掌上电脑,掌上电脑和笔记本电脑进行大量的数据处理和显示,真正满足用户的移动计算应用的需求。
4G互联网时代下,移动应用越来越多,Android 4.2.2更新包于2013年2月11日发布,未来采用Android系统手机越来越多。不仅仅在于手机,在任何移动设备上,都可以采用Android开发移植到终端设备上,例如电视、冰箱、空调、洗衣机等。将这些设备计入互联网,我们可以通过手机实时知道各个设备的状态,也可以控制它们工作。总之,Android 将带给我们更加智能、便捷、现代的生活。从而,Android应用的开发,
将会越来越庞大,需求将会越来越丰富。
1.2 论文主要工作
本论文的内容主要包括摘要、目录、绪论、Android简介及编程环境与工具、有道英语可行性分析、有道英语需求分析、有道英语APP的总体设计、有道英语APP的详细设计、有道英语APP的测试、结束语、致谢和参考文献几部分内容。
其中,绪论部分主要介绍了国内外移动互联的发展情况、课题实现的背景及意义和本论文的主要结构;Android简介及编程环境与工具部分主要介绍了编程环境的搭建,开发工具的使用;有道英语APP分析部分主要说明了该项目的可行性分析、需求分析;有道英语APP的总体设计部分主要介绍了软件每个模块的设计框架以及每个模块子模块的设计框架;有道英语APP的具体实现部分即详细设计部分,主要叙述了软件的具体实现思路、逻辑和部分主要截图及源代码;有道英语APP的测试部分主要描述了软件最后实现的效果是否满足软件设计之初的基本需求。
1.3 论文脉络

图1-1
2 项目相关技术介绍与分析
2.1 Android的发展和历史
Android是以Linux为基础的开放源码的操作系统,主要应用于便携设备。最开始由Andy Rubin开发,主要支持手机。2005年由Google收购注资,并组建开放手机联盟开发一户,其逐渐扩展至平板电脑及其他领域上。2012年2月数据显示,Android占据全球智能手机操作系统市场52.5%的份额,中国市场占有率为68.4%。
Android系统版本发布时间如表2-1所示。
表2-1 Android版本发布时间
序号时间事件12003年10月Andy Rubin等人创建Android公司,并组建Android团队22005年8月17日Google收购了成立仅22个月的高科技企业Android32007年11月5日Google公司正式向外界展示Android操作系统42008年9月22日Google正式对外发布第一款Android手机(HTC G1)52008年9月23日Android1.0正式发布62009年4月30日Android1.5正式发布72009年9月15日Android1.6正式发布82010年5月20日Android2.2版本软件开发工具包发布92010年12月7日Android2.3版本软件开发工具包发布102011年2月2日Android3.0正式发布112011年2月3日Google发布了专用于平板电脑的Android3.0蜂巢系统122011年10月19日Google正式发布Android4.0操作系统132012年6月28日Google正式发布Android4.1操作系统142012年10月30日Google正式发布Android4.2操作系统152013年7月25日Google正式发布Android4.3操作系统162013年9月4日Google正式发布Android4.4操作系统
2.2 Android体系结构
在Android操作系统中,将体系结构划分为4层:Application(应用层)、Application Framework(应用框架层)、Libraries(系统运行库层)以及Linux Kernel(Linux内核层)。Android体系结构如图2-1所示:
图2-1 Android体系结构图
2.2.1 Application(应用层)
应用层是使用Java语言进行开发的一些应用程序,如地图软件、联系人管理、E-mail连接、浏览器等都属于应用层上运行的程序,许多开发出来的程序(如音乐播放器、通讯录等)也都是运行在应用层上的。[3]该软件(TYUT掌中行)也是运行在此层上的。
2.2.2 Application Framework(应用框架层)
应用框架层主要是Google发布的一些操作支持的类库(API框架),开发人员可以使用这些类库方便地进行程序开发,但是在开发时必须遵守框架的开发原则。而在应用框架层中也包含了众多的组件。[3]
2.2.3 Libraries(系统运行库层)
当使用Android框架层进行开发时,Android操作系统会自动使用一些C/C++的库文件来支持所使用的各个组件,使其可以更好地为程序服务。[3]
2.2.4 Linux Kernel(Linux内核层)
Android操作系统主要基于Linux2.6内核,程序的安全性、驱动程序、进程管理等都由Linux内核所提供。[3]
2.3 Android开发环境与工具
2.3.1 搭建Android开发环境
1、下载、安装JDK及测试JDK是否成功安装
下载网址:http://www.oracle.com/technetwork/java/javase/downloads/index.html
下载界面如图2-2所示。

图2-2 JDK下载页面
我的JDK安装路径,如图2-3所示。

图2-3 JDK安装路径
JDK环境变量配置,如图2-4所示。
图2-4 JDK环境变量设置
检查JDK是否安装成功,在cmd下输入命令javac,如果出现如图2-5所示情况则为安装成功。

图2-5 JDK安装成功界面
下载并安装Eclipse
下载网址:http://www.eclipse.org/downloads/,如图2-6所示。下载完毕后直接解压,无需安装。
图2-6 eclipse下载界面
下载Android SDK
下载网址:http://developer.android.com/sdk/index.html,登录该网址将会出现如图2-7所示网页,点击Download the SDK选择对应版本下载解压即可。
图2-7 SDK下载界面
安装Android开发插件
(1)打开Eclipse, 在菜单栏上选择 Help->Install New SoftWare 将会出现如图2-8所示界面。

图2-8 安装插件第一步
点击 Add按钮,出现如图2-9所示界面。其中,Name可以自己设定,此处设为“Android”,Location中输入网址:http://dl-ssl.google.com/android/eclipse/。

图2-9 安装插件第二步
点击如图2-9所示界面OK按钮,出现如图2-10所示界面。
图2-10 安装插件第三步
点击如图2-10所示界面 Next按钮,出现如图2-11所示界面。

图2-11 安装插件第四步
点击如图2-11所示界面Next按钮,出现如图2-12所示界面。
图2-12 安装插件第五步
选择I accept the terms of the license agreements 点击如图2-12所示界面Next按钮,进入安装插件界面,如图2-13所示。


图2-13 安装插件第六步 图2-14 安装插件第七步
安装完成后,提示重新启动Eclipse,点击如图2-14所示界面Yes按钮。
配置Android SDK
点击Eclipse菜单window->preferences,进入如图2-15所示界面。选择SDK所在目录。点击OK。

图2-15 配置SDK
通过以上步骤,本文作者就把Android开发环境搭建好了。
2.3.2 Android开发工具介绍
任何软件的开发都离不开强大的开发工具,同理Android开发也有自己的开发工具。以下内容将简要介绍Android的开发工具。
1.JDK简介
JDK(Java Development Kit)是Sun Micro Systems针对Java开发员的产品。自从Java推出以来,JDK已经成为使用最为广泛的Java SDK。JDK 是整个Java的核心,包括了Java运行环境、Java工具和Java基础类库。
2.Eclipse简介
Eclipse 是一种基于 Java 的可扩展开源开发平台。其仅仅是一个框架和一组服务,用于通过插件组件构建开发环境。另外,Eclipse 附带了一个标准的插件集JDT(Java Development Tools),Eclipse 还包括插件开发环境PDE(Plug-in Development Environment),这个组件主要为希望扩展 Eclipse 的软件开发人员而设计。
3.ADT简介
ADT(Android Development Tools)是Android开发所用工具是Eclipse编译IDE环境中的工具,安装ADT,可以为Android开发提供便利。
4.SDK简介
SDK(Software Development Kit)是一些被软件工程师用于为特定的软件包、软件框架、硬件平台、操作系统等建立应用软件的开发工具的集合。
2.4 环境说明
以下内容将说明本文作者开发该软件所使用的编程环境以及该软件运行的平台。
2.4.1 编程环境
本文作者用Eclipse和Android SDK(Android2.2)作为编程环境,在软件编写初期使用模拟器进行测试,后期软件逐步成熟后使用真机进行测试。
2.4.2 运行环境
软件运行在操作系统为Android2.2以上版本的手机。基本满足Android2.2系统以
上的各种型号手机(主要指屏幕适配方面)。
3 项目可行性分析
3.1 可行性研究
3.1.1 技术可行性
技术可行性分析主要分析现有技术条件能否顺利完成开发工作,硬、软件配置能否满足开发者需要等。对于Android开发,Google公司提供了良好的开发集成工具,且本文作者大学所学专业为软件工程移动互联网方向,对Android手机应用有一段时间的研究与开发经验,并且熟悉Java语言。所以该软件在开发技术这方面是可行的。
3.1.2 经济可行性
本软件开发所使用的eclipse集成环境是免费软件,这很大程度上节省了开发成本。并且在后期的实际使用过程中,太原理工大学良好的校园无线覆盖为师生使用该软件过程中需要网络连接提供很大便利。所以该软件在经济可行性方面也是满足的。
3.1.3 操作可行性
该软件的安装使用和Android应用市场的大多数应用软件类似,所以大多数用户都能够在不需进行指导的前提下方便使用该软件,并且软件系统里面都有良好的提示功能。因此从操作可行性的角度来衡量,该软件的开发是可行的。
综上可知,该软件系统在技术、经济和操作上都是可行的,满足可行性分析的要求,因此可以开发此软件系统。
4 项目需求分析与总体设计
4.1 需求分析
4.1.1 功能性需求分析
通过一段时间的调研,根据反馈回来的意见,有道英语的功能需求大致定为:
a、查词并实现添加到生词本
b、翻译语句
c、四六级音频学习
4.1.2 非功能性需求分析
非功能需求有:
a、低资源消耗
手机设备CPU及内存资源相对有限,要求程序节省单词查询和翻译时所用时间以及对CPU的占用,从而节省对手机硬件资源的占用,提高程序运行的流畅度。
b、易用性
易用性是与一组规定或者潜在的用户为使用其软件所需做的努力和对这样的使用所作的评价有关的一组属性。具体包括:
• 易理解性:与用户为人质逻辑概念即其应用范围所花的努力有关的软件属性。
• 易学习性:与用户为学习软件应用所花的努力有关的软件属性。
• 易操作性:与用户为操作和运行控制所花的努力有关的软件属性。如带首字母筛选功能的下拉列表等。
4.2 系统总体设计及模块划分
4.2.1 模块划分
根据功能性需求,系统模块划分为:词典模块、翻译模块、发现模块、我的模块。对应的模块图如图4-1:

图4-1 系统模块图
4.2.2 系统操作流程图
本系统在预设的操作过程为:点击APP通过响应界面后。
第一:进入查询单词的界面,词典功能的实现是通过调用有道api进行联网查询,查询出的单词可以进行单独备份,即:录入单词本中;
第二,可以通过底部的切换卡进行,切换至翻译界面,然后可以输入对应的中英文句子,同样通过调用有道api进行联网实现翻译;
第三,通过切换卡将界面切换至发现模块,可以进行四六级音频的学习以及四六级常考的名言警句;
第四,通过切换卡将界面切换至我的模块,可以进行之前在单词查询中备份的单词进行查看,并且可以通过点击单词实现再次跳转到词典界面实现二次查询。
该软件的操作流程图如图4-2所示:

图4-2 系统操作流程图
4.3 数据库设计及数据操作
SQLite,是一款轻型的数据库,是遵守ACID的关系型数据库管理系统,它的设计目标是嵌入式的,而且目前已经在很多嵌入式产品中使用了它,它占用资源非常的低,在嵌入式设备中,可能只需要几百K的内存就够了。它能够支持Windows/Linux/Unix等等主流的操作系统,同时能够跟很多程序语言相结合,比如 Tcl、C#、PHP、Java等,还有ODBC接口,同样比起Mysql、PostgreSQL这两款开源世界著名的数据库管理系统来讲,它的处理速度比他们都快。
SQLite相关知识点:
SQLiteDatabase
一个SQLiteDatabase的实例代表一个SQLite的数据库,通过SQLite实例的一些方法,我们可以执行SQL语句,进行对数据库的增删改查。数据库对于一个应用来说是私有的,并且在一个应用当中,名字也是唯一的。
(2)SQLiteOpenHelper
这是一个抽象类。对于SQLiteOpenHelper我们通常需要继承它,并实现它里面的三个函数。
1)onCreate
在数据库第一次生成时会调用这个方法,一般我们在这个方法里生成数据库表。
2)onUpgrade
当数据库需要升级的时候,Android系统会自动调用这个方法,一般我们在这个方法里面删除数据库表,并建立新的数据库表。并且还可以根据应用需求进行其他操作。
3)onOpen
这是当打开数据库是的回调函数,一般不会用到。
本系统采用的是sqlite数据库,sqlite数据库是Android自带的小型数据库,可以将少量的数据存放在该数据库中。针对不同的用户的生词是不同的,可以很方便的将生词导入到数据库中,也可以很方便的将单词从数据库中删除。将此软件中的数据表的关系设计如下:
4.3.1 数据库概念设计
根据需求分析的结果,将本APP的数据库设计如下:

图4-3 生词表的设计

图4-4 翻译句子表的设计
图4-5历史词汇表的设计
4.3.2 数据库逻辑设计
本APP维护了3个表,并且由于为了实现简便,并没有涉及到3个表之间的交互及数据共享,因此,得到的表的结构及属性分别为:
history(_id ,query, translation ,uk ,us,explain)
sentence(_id ,JUZI ,YISI )
history(_id , query, translation, uk, us explains );
4.3.3 数据库的创建
Android 提供了标准的数据库创建方式。继承SQLiteOpenHelper ,实现onCreate() 和 onUpgrade() 两个方法,有个好处就是便于数据库版本的升级,连接数据库的算法见程序清单。数据库如果创建不成功则抛出FIleNotFoundException异常。
4.3.4 数据库的操作
Android对SQLite数据库的操作主要有插入、删除、查询操作。但是前置条件是必须打开数据库。在这里打开数据库用的主要的方法是openForReadable()和openForWriteable(),打开数据之后才能进行相关的操作,其中插入单词的方法是insert(),删除单词的方法是delete()。其详细代码见程序清单。注意:在操作完了数据库之后,需要对资源进行释放,这里就是对数据库资源进行关闭,关闭数据库的方法是close()。
4.3.5 数据的查看
Android中程序是利用Cursor游标类指向数据表中的某一项,然后进行查询数据,用Log日志显示出来。查询时用的方法是数据库本身的查询方法query(),需要注意的是这个方法比较复杂,他有8个参数,因为它将一个完整的SQL语句拆成了若干个部分:
第一个参数table:表名,相当于SQL的from后面的部分。在此还要注意
如果和多表联合查询时,就用逗号将两个表名分开,拼成一个字符串的table值。
第二个参数是columns,要查询出来的列名。相当于SQL的select后面的部分。
第三个参数是selection,查询的条件,相当于SQL的where后面的部分,在这个语句中允许使用“?”,也就是说这个用法和JDBC中的PreparedStatement的用法相似。
第四个参数selectionArgs,对应于selection的值,selection有几个问号,这里就得用几值。
第五个参数groupBy,相当于SQL的group by后面的部分。
第六个参数having,相当于SQL的having后面的部分。
第七个参数orderBy,相当于SQL的order by后面的部分,如果是倒序,或者是联合排序,可以写成类似这样:String orderBy = “id desc,name”。
第八个参数limit,指定的结果集的大小,它和Mysql的limit用法不太一样,Mysql可以指定从多少行开始之后取多少条,例如,“limit 100,10”,但是这里只支持一个数值。
5 系统的详细设计与实现
5.1 系统主界面的设计
本项目的主界面的菜单栏的底部位置是通过TabHost这个组件来实现的,首先在activity_translate.xml布局文件中声明,切换卡则通过TabWidget实现,而切换卡的背景更换则是通过chat_tab_selector.xml的设置来实现,chat_tab_selector.xml的代码如下:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ju" android:state_focused="true"/>
<item android:drawable="@drawable/dise" android:state_selected="true"/>
<item android:drawable="@drawable/dise" android:state_pressed="true"/>
<item android:drawable="@drawable/ju"/>
</selector>
制定完主页面布局后,在src/com.example.translate下的TranslateActivity文件中OnCreate(OnCreate方法是用来初始化Activity实例对象的)中调用布局,另外因为本activity在创建时没有继承TabActivity,因此必须在得到tabHost之后,添加标签之前调用tabHost.setup(),到现在为止顶部菜单栏的布局已经基本完成,但现在里面所对应的内容还是空的。所以就需要在这里给tabHost中添加tab内容,以第一格的tab为例,先是通过Intent的方式新建个intent1,用来实现页面的跳转的方法,然后动态用createTab()的方法添加对应切换卡内容以及跳转对象。具体代码如下:
public class TranslateActivity extends ActivityGroup {
private TabHost tabHost = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_translate);
tabHost = (TabHost) findViewById(R.id.trainTab);
// 如果不是继承TabActivity,则必须在得到tabHost之后,添加标签之前调用tabHost.setup()
tabHost.setup(this.getLocalActivityManager());
Intent intent1 = new Intent(this, WordActivity.class);
Intent intent2 = new Intent(this, ContentActivity.class);
Intent intent3 = new Intent(this, FxActivity.class);
Intent intent4 = new Intent(this, SCActivity.class);
createTab("词典", intent1.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));
// 切换时刷新Activity
createTab("翻译", intent2);
createTab("发现", intent3);
// 切换时刷新Activity
createTab("我的", intent4.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));
tabHost.setCurrentTab(0);
}
在上述思路下我们的详细的效果图如下:
图5-1 系统主界面
5.2 查询模块详细设计:
5.2.1 调用有道翻译API
有道翻译API,为广大开发者提供开放接口,从而降低语言理解与应用门槛。依靠有道翻译网络数据挖掘和统计机器翻译技术实力做基础,可以更加快捷的完成项目,具体代码如下:
try {
urlStr =
"http://fanyi.youdao.com/openapi.do?keyfrom=justTec&key=1249502330&type=data&doctype=json&version=1.1&q=" +URLEncoder.encode(word, "utf8");
} catch (UnsupportedEncodingException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
5.2.2 Json数据解析
在本系统中查词和翻译调用有道接口,通过HTTP协议回传给设备,返回来的数据为标准的Json格式,再通过Json解析显示到对应的UI上。具体代码如下:
try {
String jsonData = "";
// 向指定的URL发送Http请求
HttpResponse response = httpClient.execute(new HttpGet(urlStr));
// 取得服务器返回的响应
HttpEntity entity = response.getEntity();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(entity.getContent()));
String line = "";
while ((line = bufferedReader.readLine()) != null) {
jsonData = jsonData + line;
}
word = new Word();
JSONObject jsonObject = new JSONObject(jsonData);
word.setQuery(query);
word.setTranslation(jsonObject.getJSONArray("translation").getString(0));
JSONObject basic = jsonObject.getJSONObject("basic");
// 音标
word.setUk(basic.getString("uk-phonetic").trim());
word.setUs(basic.getString("us-phonetic").trim());
// 返回json数组
String otherString = "";
JSONArray otherArray = basic.getJSONArray("explains");
for (int i = 0; i < otherArray.length(); i++) {
otherString += ";" + otherArray.getString(i);
}
word.setExplains(otherString.substring(1));
} catch (Exception e) {
}
模块效果截图如下:
图5-2 模块界面 图5-3 中文查词
5.3 发现模块详细设计
发现模块意在提升大学生的空闲时间利用率,因此结合大部分同学们的需求,加入了四六级听力音频以及四六级作文中经常被引用的谚语名言,最后还加入了关于我们,用来申明一些系统的信息:
四六级听力音频,主要是利用了Android自带的mediaplayer来进行定制实现,首先将所要播放的音频放入到资源raw文件夹中,然后申明出一个mediaplayer对象,通过其start(),stop()和pause()三个方法进行对应的音频的播放,停止和暂停。具体代码如下:
布局代码:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@drawable/mao"
tools:context=".Cet41Activity" >
<Button
android:id="@+id/pauseBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="21dp"
android:layout_marginTop="122dp"
android:text="暂停" />
<Button
android:id="@+id/playBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/pauseBtn"
android:layout_alignParentTop="true"
android:layout_marginTop="28dp"
android:text="播放" />
<Button
android:id="@+id/stopBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/pauseBtn"
android:layout_below="@+id/pauseBtn"
android:layout_marginTop="46dp"
android:text="停止" />
</RelativeLayout>
对应实现代码:
player=MediaPlayer.create(this,R.raw.cet4);
playBtn.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
player.start();
playBtn.setEnabled(false);
stopBtn.setEnabled(true);
pauseBtn.setEnabled(true);
}
});
实现效果如下:
图5-4 音频课堂 图5-5 音频播放
b、谚语名言模块,将四六级考试中常用到的100句谚语名言整理成Excel文件,然后把Excle表中的100个英文语句与翻译写入数据库,然后通过随机函数Random()在每次启动程序从100个句子随机显示一句及其翻译。具体实现该模块的重点代码如下:
1)将Excle表中的句子导入数据库表的代码:
try {
// 读取Excel,导入到数据库
InputStream in = this.getClass().getClassLoader().getResourceAsStream
("com/example/translate/db/juzi.xls");
// 创建工作簿
HSSFWorkbook workBook = new HSSFWorkbook(in);
HSSFSheet sheet = workBook.getSheet("Sheet1");
int rows = sheet.getPhysicalNumberOfRows();
if (rows > 0) {
for (int j = 0; j < rows; j++) {
// 行循环
HSSFRow row = sheet.getRow(j);
if (row != null) {
HSS
参考文献
商陆民,朱丹群,周然,邢海荣. 多功能电子词典软件设计[J]. 东南大学电子工程系,1995
任桢.电子词典的设计研究[J]. 华中科技大学,2003
黄艺锋,闫巧.基于Android平台电子词典的设计与实现[J].深圳大学计算机与软件学院,2011
朱婷婷,李惠.基于Android的应用软件的综述[J] .浙江师范大学数理信息学院,2011
邵明博.基于智能手机的大学英语移动学习平台研究[D]. 华中师范大学,2011
尹京华,王华军 .基于Android开发的数据存储[J]. 成都理工大学信息科学与技术,2012
刘锐.Android开发的性能优化[D]. 新华网股有限公司,2009
Serguei A.Mokhov,Mashrur Mia.A UI Design Case Study and a Prototype of a Travel Search Engine.Scientific American,2010
J.MANI BHARATHI, S.Hemalatha, V.AISHWARYA .Advancement in Mobile Communication using Android .International Journal of Computer Applications, 2010, Vol.1 (7)
[10]Code Home.Android-An Open Handest Alliance Project.Future Generation Computer Systems,2011
外文文献
An Enhanced Dragonfly Key Exchange Protocol against Offline
Dictionary Attack
Abstract
Dragonfly is Password Authenticated Key Exchange protocol that uses a shared session key to authenticate parties based on pre-shared secret password. It was claimed that this protocol was secure against off-line dictionary attack, but a new research has proved its vulnerability to off-line dictionary attack and proving step was applied by using “Patched Protocol” which was based on public key validation. Unfortunately, this step caused a raise in the computation cost, which made this protocol less appealing than its competitors. We proposed an alternate enhancement to keep this protocol secure without any extra computation cost that was known as “Enhanced Dragonfly”.This solution based on two-pre-shared secret passwords instead of one and the rounds between parties had compressed into two rounds instead of four. We prove that the enhanced-Dragonfly protocol is secure against off-line dictionary attacks by analyzing its security properties using the Scyther tool. A simulation was developed to measure the execution time of the enhanced protocol,which was found to be much less than the execution time of patched Dragonfly. The off-line dictionary attack time is consumed for few days if the dictionary size is 10,000. According to this, the use of the enhanced Dragonfly is more efficient than the patched Dragonfly.
Keywords:Password Authenticated Key Exchange (PAKE), Original Dragonfly,
Patched Dragonfly, Enhanced Dragonfly, Two-Pre-Shared Password
Introduction
Nowadays, information is increasing at a faster rate and it needs to be secured when exchanging it over insecure networks. The most efficient way to secure this information is Cryptology which is the science of building and analyzing secret code. It consists of cryptography and cryptanalysis. Cryptography is the science that builds secret codes and cryptanalysis is the science that analyzes those codes [1]. There are two types of cryptography:
Symmetric and Asymmetric key cryptography. Symmetric key cryptography has a shared key that is used by the sender and receiver in encryption and decryption processes, while Asymmetric key cryptography has a public key which is used in encryption processes and private key which is used in decryption processes .
One of the symmetric cryptography protocols is key exchange protocol, which allows two parties who share non-secret information to compute a shared key via public communication. Authenticated Key Exchange (AKE) is a symmetric protocol that not only allows parties to compute the shared key but also ensures the identity of the parties where a party can compute a shared key only if he/she is the one who claims to be [3]. Another example of symmetric protocols is the Two-party Password-based Authenticated Key Exchange (2PAKE) protocol that permits two parties to generate a session key based on a pre-shared password and authenticates each other[4]. In general, PAKE protocols are exposed to different types of attacks, mainly passive and active attacks. Passive attacks are difficult to detect and are used to get information that is sent between parties without modifying the information or harming the resources. Active attacks enable the attacker to modify the encrypted message orchange the meaning of the decrypted message by creating false streams [5]. However, the most complicated type of attack is the dictionary attack regardless of whether it is offline or online. Offline dictionary attack enables the attacker to record information from successful execution of the protocol by eavesdropping on the communication between parties. Then the attacker goes offline to find the required password by trying all passwords and choosing the correct password depending on the recorded information. The interaction with the server is not required in an offline dictionary attack. Online dictionary attacks enable the attacker to find the required password by trying all passwords during the interaction with the server [6].
2PAKE protocol has various types of protocols. In 1992, the first 2PAKE protocol (called the Encrypted KeyExchange (EKE)) was proposed by Bellovin and Merritt [7]. Since then, many other 2PAKE protocols have been proposed (e.g. [8]-[12]). One of these protocols was Dragonfly which was defined by Dan Harkins who claimed that this protocol had resistance to passive attacks, active attacks and offline dictionary attacks without security proofs [12]. In 2013, Dylan and Feng analyzed this protocol and proved that this protocol had weakness points in its security properties against active attack and offline dictionary attacks. They proposed to patch Dragonfly as a solution to verify its security properties by adding a public key validation [12].
The main problem in the patched dragonfly protocol was that it consumed an increased computation cost during the execution of the protocol when public key was used, which involved a large bit operation. In this paper,we introduced another enhancement for the Dragonfly protocol without using a public key. The proposed solution is based on using two-pre-shared secret passwords instead of one and the number of rounds between parties has been reduced to two instead of four. This step adds more security to the original Dragonfly protocol while the attacker will require more than 1.5 days to perform the off-line attack in case the shared password is extracted from a dictionary with the size 1000. This result has been approved through a simulation project which was developed by the java programming language. The simulation project has been used to find out the required execution time by both parties who are sharing the communication. The execution time is found to be less than
the time required in the use of public key validation. We also approved the efficiency of Enhanced-Dragonfly protocol by using the Scyther tool to analyze its security properties and its structure.
The paper is organized into sections: Section 2 presents the related work; Section 3 presents review of the Dragonfly protocol; the proposed solution is presented in Section 4, while discussion is presented in Section 5.Finally, the conclusion is in Section 6. It is focused towards those who are interested in cryptography and cryptanalysis domain.Related Work
Password Authenticated Key Exchange (PAKE) protocols have been playing an essential role in providing secure communications. As is usual in cryptography, with each new release of a protocol, attempts to attack this protocol have also been released in order to measure resistance against these attacks.
In research [13], analysis of the security weaknesses of SPAKE1 and SPAKE2 protocols has been introduced.It was found that these protocols are vulnerable against password compromises, impersonation and Denialof-Service (DoS) attacks. Additionally, it was proved that the Hitchcock protocol [14], which uses public key encryptions, is insecure against momentary key compromise masquerades, Key Compromise Impersonation(KCI) attacks and off-line dictionaries. To remove these disadvantages, a new efficient protocol has been designed which relies on two-party PAKE protocols based on symmetric key exchange protocol and multiple hashfunction calculations. The public key scheme has been replaced here with the symmetric encryption because the
latter requires fewer bit operations. Many theories have been explained to prove that the proposed scheme is secure against various attacks. It provides the mutual authentication and forward secrecy attributes with many other security attributes. However, there is a little increase in computational costs that was caused by the extra hash calculations. This may be deemed negligible when considering the efficiency of the extra security attributes and lower number of rounds.
Moreover, another research [15] introduced the vulnerabilities of SPEKE and EKE protocols and analyzed them due to theoretical practices. In addition, a new PAKE protocol was proposed and was called Password Authenticated Key Exchange by Juggling (J-PAKE). It depends on shared secret-password between two entities and it has two rounds to create a strong shared key. It is based on well-established primitive in cryptography called Zero-Knowledge Proof (ZKP) that allows a person to prove his knowledge of a discrete logarithm without revealing it. The analysis of this protocol proved that it prevents off-line dictionary attacks, limits an active attacker to guess only one password per protocol execution and provides forward secrecy. It has advantages like:protection of users from leaking passwords and it does not require PKI deployments. This protocol is very efficient
according to the use of well-established primitives.
Recent researches in the field of PAKE protocols are moving towards using Public Key Infrastructure (PKI) in the authentication process. In recent years, PAKE has been used with RSA encryption method to provide the appropriate secrecy between two parties. In [16] a new proposed protocol named as E3PAKE-RSA, which is based on RSA scheme with the three-party model that enables two entities to only need to remember a humanmemorable
password to authenticate each other and agree on a large session key with the assistance of the trusted server. The public/private key parameters are selected by the clients rather than a trusted distribution center, which makes the process of on-line authentication obsolete. It was predicted that the computation cost for this protocol would be respectively high according to the two-party RSA-PAKE. However, during the testing phase, which applied to the generic constructions, the computation cost of E3PAKE-RSA protocol was found to be as much as the two-party RSA-PAKE and the number of total rounds are less than this. Actually, this protocol requires more time to execute due to the use of the RSA encryption method and the long bit operations, while the other PAKE protocols (which do not use PKI) work faster.
Overview on Dragonfly Protocol
Dragonfly is a PAKE protocol that is used to exchange session keys between two parties with mutual authentication inside mesh networks. It was defined by Dan [12]. Finite cyclic groups are required to implement dragonfly such as Finite Field Cryptography (FFC) or Elliptic Curve Cryptography (ECC) [17]. This paper implements this protocol by using FFC. A finite field is “a field F that contains a finite number of elements which is the order of F” [18]. More details about finite field are presented in.
In this section, we will explain the Dragonfly protocol in detail, with the discovered attack on it followed bythe solution which is suggested in [12].The Proposed Solution
This paper proposes a solution to secure the original Dragonfly protocol without the addition of public key in order to keep the execution time as fast as possible. It relies on using two pre-shared passwords instead of one. Here the attacker must search for each N, P in the dictionary. The first password P will be generated in the same way as in the original Dragonfly protocol. This is done by extracting a string from the dictionary and using the
identities of both parties. It has a length of 1024 bits. The generation of the second password N is the same as Pbut with two minor changes; which are based on the extraction of another word from the same dictionary and the use of the identity of the respondent and it has a length of 160 bits instead of 1024.
The enhanced Dragonfly protocol will work according to the following steps:
Two passwords will be generated, which are P and N, and will be shared between both parties.
Both parties produce scalar and element operations based on choosing one scalar that belongs to Q randomly(r). Then each party will compute his/her scalar (A,B) = r(A,B) + N and element operations E = P – N.
Both parties will compute the hash value of E which is E' = H (E).
The first party will compute the hash value A for the parameters E' and sA. Then A will be sent to the second party with the scalar value of the first party. The second party will verify the hash value A to ensure the authentication process. Here if the hash value is verified then the second party will compute the hash value B and send it to the first party with his/her scalar value SB, otherwise it will be declined. The first party in turn will verify the hash value B. If it is valid then the authentication succeeds.
After that each party will calculate the shared secret which is ss = (PsB E)rA
Then they create a shared secret key which is K = H(ss|E|(sA + sB) mod q).
The benefits of this solution are: firstly, the attacker will never be able to guess the hash value which includes the hash of the element value that uses the exponent of two-secret values. Secondly, the authentication processoccurs in two rounds rather than four rounds as in the original protocol. This elimination makes the execution process go faster. The steps of enhanced Dragonfly protocol have been displayed in Figure 2.
4.1. Methodology over Protocol Testing
A simulation project has been developed to test the time needed to execute the protocol compared to the patched dragonfly protocol. It was written in Java and maintained in Net Beans. This project has been handled by using 64 bits Windows 8.1 pro-operating system and a processor with the speed 2.38 GHz. This project includes three various classes:
Dragonfly: is the main class that has objects from the other two classes and it also has some local variables
such as:
• ID_A, ID_B are identities of initiator and respondent. The identity is the Mac address. For example ID_A =
001CB3098515, ID_B = 001AB3008600.

3) EnhancedDragonfly: is the class that implements the proposed solution. It works as the initiator agent,which is Alice. The respondent agent which is Bob will follow the same steps that are provided by this class.First, a random value rA will be selected from {1,…,q} while q is a Subgroup Order as shown in Table 2. The
passed P and N will be used with rA to calculate Scalar sA, Element E and hash value A. Then these values will be used to calculate the shared secret key. We use MD5 for hash function.
This class includes seven methods:
Enhanced Dragonfly is the constructor that takes p_modularandq as parameters.
scalar_operation: it is calculating scalar operation that is sA = rA + N
element_operation: it is calculating element operation that is E = P N
sending_operation: it is used to calculate and send the hash value A
verifying_operation: It returns true or false according to the verification of the hash value of the other party.
sharedsecret_computation: used to calculate the shared secret key ss, which will be used later in the next equation.
sharedkey_computation: returns the secret key in the form of hash value.

The class diagram of this project is displayed in Figure 3, while Figure 4 presents the input and output of Enhanced Dragonfly protocol simulation. The values of important parameters of Enhanced Dragonfly protocol simulation are listed in Table 2.
By applying this simulation, the execution time for one participant was found to be 19 minutes only. This experiment was applied 15 times in order to measure the total execution time of the enhanced Dragonfly protocol and the average of the total time is almost 38 minutes. This result works as a proof for the efficiency of the proposed solution, and the use of two-shared passwords will not affect the time of exchanging the secret keys.
4.2. Testing and Analysis of the Enhanced Dragonfly Protocol
Any protocol should be analyzed in order to see if there are any possible attacks that can occur and find how secure it is. The automatic analysis is the most recent approach which is used in analysis of security protocols and it is more efficient than the manual one. The required time to write the protocol description depends on the
learning of its language. All possible attacks will be tested by the used tool. The automatic analysis will be used in this research. Various tools are used to analyze the security protocols and to check the possibility of any attack can happen when protocol is put to use. An example for this is the Scyther tool which supports the evaluation of protocols with respect to these corruption models which have led to the automatic detection of many attacks that previously could only be found by manual analysis [22].
4.2.1. Description of Scyther Tool and SPDL
Scyther [23] is one of the most efficient analyzing tools compared with other tools [24]. It was found that this tool can discover attacks more efficiently than others and it can also verify protocols with an unlimited numberof sessions. Its run time is also less than others. There are many protocols that have been analyzed by this tool such as IKEv1, IKEv2 protocol suits, ISO/IEC 9798 family of authentication protocols and MQV family of protocols.
The Scyther tool takes the protocol description as input, and outputs a summary report stating whether the claim was true or false, whether any attack was found or not, and optionally, visual graph descriptions in the dot language from the GraphVizlibrary or representations of trace patterns in XML which describe the trace pattern[25]. Additionally, there are a set of Python bindings for the Scyther command-line tool, which provide a convenient means to script Scyther experiments. Figure 5 displays how this tool works.
Security Protocol Description Language (SPDL) is a language that is used in Scyther for writing a protocol[26]. This language is just expressive enough to capture the most relevant security protocols in an abstract way.It allows us to develop high-level reasoning methods and tools, which can be applied to a large class of protocols.SPDL is used to create a definition for existing protocols that use symmetric or asymmetric encryption. It includes three scopes; global scope (the largest scope), protocol scope (smaller than global) and role scope (thesmallest one). Furthermore, it includes the initial knowledge required to execute a role (each agent’s role includessequence of events, such as sending or receiving a message), the declaration of functions, global constants and variables.
4.2.2. SPDL of Enhanced Dragonfly Protocol and Analysis Result
In this sub-section, the SPDL representation of Enhanced Dragonfly protocol will be explained in detail. After that, the findings from this analysis will be discussed. The SPDL code of the enhanced dragonfly is displayed in Figure 6. First of all, a global hash function H1 & H2 has been defined (outside the protocol definition) to make it available to be accessed by all rolls in the protocol. Also, the functions of multiplication mult, addition add,
exponential exp and the inverse inv were defined globally. Function is a special type which defines a function term that can take a list of variables. By default, it behaves like a hash function: given the term H1(x) where H1 is of type Function, it is impossible to derive x. These functions are defined in an abstract way in SPDL, which doesn’t support any real equations.
Next, the protocol description starts with the keyword protocol which takes the role names as parameters.There are three rolls, namely; the key generator center (role KGC), the initiator (role A) and the respondent (role
B):
• Key generator center role KGC [27]: Used here to pass the shared secret password P and N to role A and B. The way of generation, which is used to generate these shared passwords, doesn’t take a place here in the tool because the tool depends on the structure of the protocol only. The shared secret passwords P&N have been identified as constants and their scope is within the protocol because they should be used inside all
roles.
• Initiator role A:
This role represents the start of the communication to compute the shared secret key. The selection of random
value rA, which is the first step in the protocol structure (see Figure 2) by Alice (initiator), has been
clarified by using the fresh declaration which is used by SPDL to get random values. Nonce is a standard
data type that is often used in Scyther tool.
The calculation of SA (Scalar value), E (element value), and A1 (hash value) occurs by using the predefined
functions, and then SA and A1 will be sent to role B.
Note: labels in recv and send need to disambiguate similar occurrences of events in a protocol specification.
In addition, they are used to link each send event with its recv one [28].
In the received event of role A, the hash value of B and the Scalar value SB will be saved in a Ticket variable,which can be substituted by any term.Role A will verify if these values are from Role B or not by using the match function. The definition of match [29] ensures the new variable assignment equivalent to the old one and it returns true or false. If the returned value is true then the next steps computed, otherwise Role A will conclude that this value is not from the honest agent, and it closes the session.
The calculation of the secret key needs to be kept in secrecy, so that a claim with the type secret is used. The main idea behind claim events is locality [28] [29]: that a term is not in the adversary knowledge, or any certain role in run. Secrecy means that if an agent communicates with non-compromised agents, the term should be secret in every trace of the protocol. Secrecy expresses that certain information is not revealed to an adversary, even though this data is communicated over an un-trusted network. Here, claim event has been
used to keep session’s key secret and is known to role A only. When the tool runs, it tries to find the corresponding attack to each claim.
• Respondent Role B:
Generates the random value rB by fresh declaration.
Calculates the scalar SB, Element E and hash value B1 and sends it to Role A.
Verifies the received hash value from Role A and compares it by using match function.
If the output of matching is true, then B will calculate the secret session key and claim it with secret type.The SPDL of the protocol is inserted into the Scyther tool to see if any attack could occur or if there is any structural weak point in this proposed protocol. The result of this analysis brings out that there is NO attack found. All roles are verified, which means that no impersonation can occur during the connection and the characteristics of the protocol structure are verified. This means that the way of exchanging the data is totally secure.This result is printed in Figure 7 and Figure 8.
5、Discussion
5.1. Off-Line Attack Simulation
Attack class has been applied to previous simulation projects. This class works by measuring the time taken to check all possible passwords, as dictionary size varies from 100, 1000 to 100,000 words. Each experiment was performed 5 times to find the search time by attack class and the average value was taken. As a result, the average time of this search within the enhanced protocol increased linearly as with increase in the dictionary size. The average time of off-line search when the dictionary length is 10,000 is more than 1.5 days, and with the
original Dragonfly protocol [12] the off-line search algorithm took an average of 25 seconds to find the correct password with the same dictionary length. This is because the enhanced protocol has an exponential relationship between the two-secret passwords in thecomputation of the element variable. Therefore, the attacker will be forced to search for two words instead of one. As a comparison between the time that is required for searching one password and the time required for searching two passwords, this experiment found that the time increased
exponentially. The search of such an attack on the patched Dragonfly protocol requires few days to be successful. However, here the execution time will have an impact on the efficiency of Key exchange technique. Table 3 shows a linear relationship between dictionary size and the time taken to try all passwords.
5.2. Comparison between Enhanced Dragonfly and Patched Dragonfly Protocols
The enhanced Dragonfly protocol is very similar to the patched Dragonfly protocol except for two minor changes. Firstly, the patched protocol uses only one shared password and a public key, while the enhanced protocol uses two-shared passwords. Second, the rounds between the initiator and the respondent are only two rounds in the enhanced protocol while it is four rounds in the patched protocol. However, the patched dragonfly involves some computational cost because it is uses a public key validation which creates large bit operations due to its large size. This can decrease the protocol efficiency and make it less appealing than its competitors[12]. Otherwise, in the enhanced dragonfly protocol, the execution of the protocol will take less time. In order to measure the execution time of the enhanced Dragonfly protocol we used the simulation project to compute the time required by the key generation center that uses dictionary size 10,000 plus the time which required by the
initiator party when execute the required computation of the protocol. The cost of both patched and enhanced Dragonfly protocol for each participant has been placed into Table 4, and based on these time measurements we have observed that the efficiency of using two-shared passwords is more than using the public key.
The limitation of this research is that these results are based on a normal speed machine with the 64 bits Windows 8.1 pro-operating system and a processor with the speed of 2.38 GHz which is not the case in the real time attack. Furthermore, the attacker is likely to significantly shorten the time of exhaustive search by distributing the calculation over several high performance machines.
