Algorithm generation 7--cvn

Source: Internet
Author: User

When CVN is calculated, two 64-bit verification keys, Keya and keyb, are used.

 

 

1) Data Sources for CVN calculation include: Primary Account (PAN), downtime, and Service Code, which are arranged from left to right.

4123456789012345 + 8701 + 111

 

2) Extend the data source to 128-bit binary data (less than 128-bit right-complement binary 0 ).

41234567890123458701111 + 000000000

 

3) divide 128-bit binary data into two 64-bit data blocks. The leftmost 64-bit is block1, And the rightmost 64-bit is block2.

Keya = 0123456789 abcdef, block1 = 4123456789012345

 

4) use Keya to encrypt block1.

3des_enc (block1, Keya, enca)

Enca = b76addce71ccc6be

 

5) The encrypted results of block1 are different or different from those of block2. Use Keya to encrypt an exception or result.

Block2 = 8701111000000000

Encb = XOR (block2, enca)

Encb = 306bccde71ccc6be

3des_enc (encb, Keya, ENCC)

ENCC = bae6746f6de1f0e6

Keyb = fedcba9876543210

 

6) Use keyb to decrypt the encrypted result.

3des_de (ENCC, keyb, encd)

Encd = b262abcb9de99a63

 

7) Use Keya to encrypt the decryption result.

3des_enc (encd, Keya, ENCE)

Ence = 8d5625fa78011a0c

 

8) extract the numbers (0-9) from the Left to right to form a group of numbers.

Ccrsn = 85625780110

 

9) extract the characters (A-F) in the encryption result from left to right, subtract 10 and combine the remainder array into a group of numbers after the numbers in step (8.

Ccrsa = dfaac

CCRSA-10 = 35002 // each digit minus 10

RST = 85625780110 35002

 

10) the first group of three digits on the left of STEP (9) is the CVN value.

CVN = 856

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.