The following
http://www-03.ibm.com/security/cryptocards/pdfs/IBM_4758_Basic_Services_Release_2_52.pdf
is referenced from http://jpos.org/wiki/HSM_basics
-chhil
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
Join us in IRC at http://webchat.freenode.net/?channels=jpos
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAKV%2BfV05GPgsJmGSdM%3DG4iUU5HmWjcAck9j5iSC7iBKQM%3Dd%2B7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
https://eftcalculator.codeplex.com/SourceControl/latest#EFTCalculator.Core/Utility/Utility.vb
Here is some .Net code from the above link that translates the earlier graphic.
''' <summary>
''' Calculates a CVV.
''' </summary>
''' <param name="CVKPair"></param>
''' <param name="AccountNumber"></param>
''' <param name="ExpirationDate"></param>
''' <param name="SVC"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Shared Function GenerateCVV(ByVal CVKPair As HexKey, ByVal AccountNumber As String, ByVal ExpirationDate As String, ByVal SVC As String) As String
Dim CVKA As String = CVKPair.PartA
Dim CVKB As String = CVKPair.PartB
Dim block As String = (AccountNumber + ExpirationDate + SVC).PadRight(32, "0"c)
Dim blockA As String = block.Substring(0, 16)
Dim blockB As String = block.Substring(16)
Dim result As String = TripleDES.TripleDESEncrypt(New HexKey(CVKA), blockA)
result = XORHex(result, blockB)
result = TripleDES.TripleDESEncrypt(New HexKey(CVKA + CVKB), result)
Dim CVV As String = "", i As Integer = 0
While CVV.Length < 3
If Char.IsDigit(result.Chars(i)) Then
CVV += result.Substring(i, 1)
End If
i += 1
End While
Return CVV
End Function
-chhil
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAPazefCCJ%2B%3Db5WyC4FmZbUWbOOSkbEgH-68iERWe5cXcRS_3sw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAKV%2BfV2%3Di-tfyDj17eaUGMZV3P7jm4aw9PRaUvtOvwyZwWsK2Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAPazefARnf9rZ0jMKwchj9aSZWbyEVsn72L9H8dX%2B%3DD2ibkmLA%40mail.gmail.com.
Without getting into why you need this, I don't think hsms differentiate on card type to validate a cvv/csc. So I would assume the algorithm should not vary.
An addition of cvv generation in the jpos security module might be a good thing.
-chhil
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
Join us in IRC at http://webchat.freenode.net/?channels=jpos
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/5507D493.9070904%40talktalk.net.
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAPazefCRim9BAxc%3DJEW4mBSe%3D-2g6xEiySQF%3D7sGmJ4r4K293g%40mail.gmail.com.To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
Join us in IRC at http://webchat.freenode.net/?channels=jpos
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
--- You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/55092CD1.2030807%40talktalk.net.