【EMV L2】SDA静态数据认证处理流程

【静态数据认证】

静态数据认证处理过程中,卡片没有执行任何处理,终端执行的处理流程:
1、认证中心公钥的获取
终端使用卡片上的认证中心公钥索引(PKI)【TAG:8F,Certification Authority Public Key Index】以及注册的应用提供商标识(RID)【TAG:9F06,Application Identifier(AID)-terminal】来获取存储在终端的认证中心公钥和相关信息;

注:认证中心公钥是预先存储在终端里的,通过PKI和RID作为索引找到;

2、发卡行公钥的获取
终端用认证中心公钥验证发卡行公钥证书【TAG:90,Issuer Public Key Certificate】,验证正确则从发卡行公钥证书中取出发卡行公钥

注:通过第1步获取到认证中心公钥后,使用该公钥经过RSA算法解密发卡行公钥证书【TAG:90】的数据;根据解密后的数据(格式参考Book2,5.3,Table6)验证是否正确,如果正确,则可以获取到发卡行公钥(发卡行公钥有一部分是解密后获得的);

3、签名静态应用数据的验证
终端用发卡行公钥验证签名静态应用数据【TAG:93,Signed Static Application Data】,如果验证不正确,则数据可能被篡改,静态数据认证失败了;

注:通过第2步获取到发卡行公钥后,使用改公钥经过RSA算法解密签名静态应用数据【TAG:93】的数据;根据解密后的数据(格式参考Book2,5.4,Table7)验证是否正确;

4、静态数据认证结果
如果以上所有步骤得以成功执行,则静态数据认证通过;
如果静态数据认证失败,终端设置终端验证结果中的相应指示器,以显示静态数据认证结果,并在随后的处理中使用该指示器决定交易的处理;

 


【发卡行公钥的获取(Book2,5.3)】

1. If the Issuer Public Key Certificate has a henght different from the length of the Cerfitfication Authority Public Key Modulus obtained in the previous section, SDA has failed.
2. In order to obtain the recovered data speicified in the Table 6, apply the recovery function specified in Annex A2.1 to the Issuer Public Key Certificate using the Certification Authority Public Key in conjunction with the corresponding algorithm. If the Recovered Data Trailer is not equal to 'BC', SDA has failed.
3. Check the Recovered Data Header. If it is not '6A', SDA has failed.
4. Check the Certificate Format. If it is not '02', SDA has failed.
5. Concatenate from left to right the second to the tenth data elements in Table 6(that is, Certificate Format through Issuer Public Key or Leftmost Digits of the Issuer Public Key), followed by th Issuer Public Key Remainder(if present), and finally the Issuer Public Key Exponent.
6. Apply the indicated hash algorithm(derived from the Hash Algorithm Indicator) to the result of the concatenation of the previous step to produce the hash result.
7. Compare the calculated hash result from the previous step with the recoverd Hash Result. If they are not the same, SDA has failed.
8. Verify that the Issuer Identifier mathces the leftmost 3-8 PAN digits (allowing for the possible padding the Issuer Identifier with hexadecimal 'F's). If not, SDA has failed.
9. Verify that the last day of the month specified in the Certificate Expiration Date is equal to or later than today's date. If the Certificate Expiration Date is earlier than today's date, the certificate has expired, in which case SDA has failed.
10.Verify that the concatenation of RID, Certification Authority Public Key Index and Certificate Serial Number is valid. If not, SDA has failed.
11.If the Issuer Public Key Algorithm Indicator is not recognised, SDA has failed.
12.If all the checks above are correct, concatenate the Leftmost Digits of Issuer Public Key and the Issuer Public Key Remainder(if present) to obtain the Issuer Public Key Modulus, and continue with the next steps for the verification of the Signed Static Application Data.


【签名静态应用数据的验证(Book2,5.4)】 

1. If the Signed Static Application Data has a length different from the length of the Issuer Public Key Modulus, SDA has failed.
2. In order to abtain the Recovered Data specified in Table 7, apply the recovery function specified in Annex A2.1 on the Signed Static Application Data using the Issuer Public Key in conjunction with the corresponding algorithm. If the Recovered Data Trailer is not equal to 'BC', SDA has failed.
3. Check the Recovered Data Header. If it is not '6A', SDA has failed.
4. Check the Signed Data Format. If it is mot '03', SDA has failed.
5. Concatenate from left to right the second to the fifth data elements in Table7(that is, Signed Static Data Format through Pad Pattern), followed by the static data to the authenticated as specified in section 10.3 of Book 3. If the Statis Data Authentication Tag List is present an contains tags other than 82, then SDA has failed.
6. Apply the indicated hasd algorithm (derived from the Hash Algorithm Indicator) to the result of the concatenation of the previous step to produce the hash result.
7. Compare the calculated hash result from the previous step with the recoverd Hash Result. If they are not the same, SDA has failed.
8. If all of the obove steps were executed successfully, SDA was successful. The Data Authentication Code recovered in Table 7 shall be stored in tag '9F45'.

 

 

转载于:https://www.cnblogs.com/utank/p/8469360.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/354089.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

java取邮箱前缀_java抓取网页或文件中的邮箱号码

java抓取网页或文件中的邮箱号码发布时间:2020-10-18 08:58:32来源:脚本之家阅读:69作者:java大渣渣本文实例为大家分享了java抓取邮箱号码的具体代码,供大家参考,具体内容如下java抓取文件中邮箱号码的具体…

为Twitter4j创建自定义SpringBoot Starter

SpringBoot提供了许多启动器模块来快速启动和运行。 SpringBoot的自动配置机制负责根据各种标准代表我们配置SpringBean。 除了Core Spring Team提供的现成的springboot启动器之外,我们还可以创建自己的启动器模块。 在本文中,我们将研究如何创建自定义…

mac php gd库,mac下安装GD库FreeType

MacBook Pro安装的新系统10.10.3,PHP环境也是默认就有的,GD库在默认情况下也安装过了,但在使用验证码的时候,提示GD库不支持FreeType,这里我们手动安装一下。法一:安装 FreeType前往苹果官方开源支持&#…

php异步查询数据库,php中mysql数据库异步查询实现

问题通常一个web应用的性能瓶颈在数据库。因为,通常情况下php中mysql查询是串行的。也就是说,如果指定两条sql语句时,第二条sql语句会等到第一条sql语句执行完毕再去执行。这个时候,如果执行2条sql语句,每条执行时间为…

java btrace_BTrace:Java开发人员工具箱中的隐藏宝石

java btrace这篇文章是关于BTrace的 ,我正在考虑将其作为Java开发人员的隐藏宝藏。 BTrace是用于Java平台的安全,动态跟踪工具。 BTrace可用于动态跟踪正在运行的Java程序(类似于DTrace,适用于OpenSolaris应用程序和OS&#xff09…

共享文件夹不能访问的问题解决

打开控制面板--管理工具--服务--webclinet,设为自动,启动。重启电脑,搞定!转载于:https://www.cnblogs.com/atlj/p/8481257.html

xampp浏览php出现乱码,dvwa+xampp搭建显示乱码的问题及解决方案

如图,dvwa显示乱码,解决办法有两个:1、方法一是,临时解决办法,也就是每次都得手动修改:利用浏览器的编码修改2、方法二是:永久方案,那就是修改dvwa的配置文件,修改默认编…

HotSpot的-XshowSettings标志的简单性和价值

一个方便的HotSpot JVM标志 ( 选项为Java启动 java )是-XshowSettings选项。 Oracle Java启动器描述页面中对此选项进行了如下描述 : -XshowSettings : category显示设置并继续。 该选项的可能类别参数包括: all显示所…

Python验证码简单实现(数字和大写字母组成的4位验证码)

#数字和英文大写字母的4位随机数 def checkcode(): #def 定义方法 checkcode() 方法名()import random # 导入包checkcode ""string range(0,4)for i in string:current random.randrange(0,3) #randrange随机数 参数1<随机数<参数2if current ! i:temp …

php haystack,haystack(示例代码)

1、haystack简介Haystack是django的开源全文搜索框架(全文检索不同于特定字段的模糊查询&#xff0c;使用全文检索的效率更高 )&#xff0c;该框架支持Solr,Elasticsearch,Whoosh, Xapian&#xff0c;搜索引擎它是一个可插拔的后端(很像Django的数据库层)&#xff0c;所以几乎你…

猫眼电影面试经历

面试是昨天上午进行的&#xff0c;因为昨天家里断网了&#xff0c;所以未能及时记录。 昨天的面试进行到了第三面&#xff0c;由于第三面的面试官当天未上班&#xff0c;所以成了回家等通知了。 感觉总体面试过程回答了百分之七十的样子吧&#xff01;一面、二面面试官都不错&a…

fopen php 乱码,如何解决php fgets读取文件乱码的问题

如何解决php fgets读取文件乱码的问题,文件,乱码,简体中文,记事本,页面如何解决php fgets读取文件乱码的问题易采站长站&#xff0c;站长之家为您整理了如何解决php fgets读取文件乱码的问题的相关内容。php fgets乱码的解决办法&#xff1a;首先依次点击“菜单修改->页面属…

一致性哈希算法原理分析及实现

一致性哈希算法常用于负载均衡中要求资源被均匀的分布到所有节点上&#xff0c;并且对资源的请求能快速路由到对应的节点上。具体的举两个场景的例子&#xff1a; 1、MemCache集群&#xff0c;要求存储各种数据均匀的存到集群中的各个节点上&#xff0c;访问这些数据时能快速的…

jsf集成spring_JSF – PrimeFaces和Hibernate集成项目

jsf集成spring本文介绍了如何使用JSF&#xff0c;PrimeFaces和Hibernate开发项目。 下面是一个示例应用程序&#xff1a; 二手技术&#xff1a; JDK 1.6.0_21 Maven的3.0.2 JSF 2.0.3 PrimeFaces 2.2.1 Hibernate3.6.7 MySQL Java连接器5.1.17 MySQL 5.5.8 Apache Tomcat 7.…

帝国 loginjs.php,帝国cms 6.6 后台拿shell

时间:2013-02-27来源:源码库 作者:源码库 文章热度:℃漏洞作者&#xff1a; 付弘雪提交时间&#xff1a; 2013-01-21公开时间&#xff1a; 2013-01-21漏洞类型&#xff1a; 文件上传导致任意代码执行简要描述&#xff1a;帝国cms 6.6版本后台拿shell 比网上流行的方法简单很多由…

合并两个排序的链表递归和非递归C++实现

题目描述&#xff1a; 输入两个单调递增的链表&#xff0c;输出两个链表合成后的链表&#xff0c;要求合成后的链表满足单调不减规则。 1、分析 已知输入的两个链表递增有序&#xff0c;要使输出的链表依然递增有序&#xff0c;可以依次从输入的两个链表中挑选最小的元素插入到…

带有JSF,Servlet和CDI的DynamicReports和JasperReports

在此示例中&#xff0c;我将展示如何将DynamicReport和JasperReports与Servlet和CDI集成。 工具&#xff1a; TIBCO Jaspersoft Studio-6.0.4。最终版 Eclipse Luna服务版本2&#xff08;4.4.2&#xff09;。 WildFly 8.x应用程序服务器。 这是Eclipse上项目层次结构的屏幕…

《Android进阶之光》--View体系与自定义View

No1&#xff1a; View的滑动 1&#xff09;layout()方法的 public class CustomView extends View{private int lastX;private int lastY;public CustomView(Context context,AttributeSet attrs,int defStyleAttr){super(context,attrs,defStyleAttr);}public CustomView(Cont…

js 数组 ajax php,js里面的对象ajax post到php端直接变成数组了?

本帖最后由 zhoumengkang 于 2013-09-12 10:03:14 编辑 事先引入了jqueryvar str "{a:b,aa:bb}";var str2 eval((str));var type typeof(str2);console.log(str);console.log(type);//objectconsole.log(str2);$.post(./bb.php,{data:str2});bb.php的代码$data $_…

【标签组件与图标 3.3】

1.图片图标。 SWing 利用javax.swing.ImageIcon 类根据现有图片创建图标&#xff0c;ImageIcon类实现了Icon接口&#xff0c;同时Java支持多种图片格式。 public ImageIcon&#xff08;&#xff09;:该构造方法创建了一个通用的ImageIcon对象&#xff0c;当正真需要设置图片时在…