Search Results

Search found 26 results on 2 pages for 'calccrypto'.

Page 1/2 | 1 2  | Next Page >

  • create this array

    - by calccrypto
    i know this sounds silly, but can someone please post the arrays described by rfc2612: Cm = 0x5A827999 Mm = 0x6ED9EBA1 Cr = 19 Mr = 17 for (i=0; i<24; i++) { for (j=0; j<8; j++) { Tmj_(i) = Cm Cm = (Cm + Mm) mod 2**32 Trj_(i) = Cr Cr = (Cr + Mr) mod 32 } } i think im doing is wrong for some reason i get this for Tr [[10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2], [10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2], [10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2], [10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2], [10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2], [10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2], [10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2], [10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2]]

    Read the article

  • Adding barcodes to pdfs

    - by calccrypto
    is there any way to do something like a mail merge, where the data (9-15 chars long) is converted to a barcode? im using trying to use openoffice's code128 for calc, but for some reason, every 10 strings, the barcode goes crazy, and the ascii tells me to register at the site where the extension came from, which i dont want to do i also found one for oodraw, but that requires the values to be inputted manually. since im not familiar with the macros, i can't write something that will do it automatically what im trying to do is: take an old pdf (only 1 page) covert it to word or picture or something add a function/macro/whatever to show a barcode (whether or not the barcode shows in this file, i dont care), given a string from excel data reconvert to separate pdfs or some other way that adds barcodes to pdfs all other free programs i have found do not do this nicely, and since im not really a pdf person, im not going to buy random programs. i just need this done for one large batch of data

    Read the article

  • RC2 key schedule

    - by calccrypto
    Can someone explain how the RC2 key schedule works (particularly the very beginning of it)? i know it uses little endian, but my implementation is not working for any key except "0000 0000 0000 0000" Test Vector Key = 88bc a90e 9087 5a Plaintext = 0000 0000 0000 0000 Ciphertext = 6ccf 4308 974c 267f im assuming that the first thing to do with the key would be to change it into bc88 0ea9 8790 5a and yes i know RC2 is not even used anymore, but i would still like to know

    Read the article

  • DSA signature verification input

    - by calccrypto
    What is the data inputted into DSA when PGP signs a message? From RFC4880, i found A Signature packet describes a binding between some public key and some data. The most common signatures are a signature of a file or a block of text, and a signature that is a certification of a User ID. im not sure if it is the entire public key, just the public key packet, or some other derivative of a pgp key packet. whatever it is, i cannot get the DSA signature to verify here is a sample im testing my program on: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 abcd -----BEGIN PGP SIGNATURE----- Version: BCPG v1.39 iFkEARECABkFAk0z65ESHGFiYyAodGVzdCBrZXkpIDw+AAoJEC3Jkh8+bnkusO0A oKG+HPF2Qrsth2zS9pK+eSCBSypOAKDBgC2Z0vf2EgLiiNMk8Bxpq68NkQ== =gq0e -----END PGP SIGNATURE----- Dumped from pgpdump.net Old: Signature Packet(tag 2)(89 bytes) Ver 4 - new Sig type - Signature of a canonical text document(0x01). Pub alg - DSA Digital Signature Algorithm(pub 17) Hash alg - SHA1(hash 2) Hashed Sub: signature creation time(sub 2)(4 bytes) Time - Mon Jan 17 07:11:13 UTC 2011 Hashed Sub: signer's User ID(sub 28)(17 bytes) User ID - abc (test key) <> Sub: issuer key ID(sub 16)(8 bytes) Key ID - 0x2DC9921F3E6E792E Hash left 2 bytes - b0 ed DSA r(160 bits) - a1 be 1c f1 76 42 bb 2d 87 6c d2 f6 92 be 79 20 81 4b 2a 4e DSA s(160 bits) - c1 80 2d 99 d2 f7 f6 12 02 e2 88 d3 24 f0 1c 69 ab af 0d 91 -> hash(DSA q bits) and the public key for it is: -----BEGIN PGP PUBLIC KEY BLOCK----- Version: BCPG v1.39 mOIETTPqeBECALx+i9PIc4MB2DYXeqsWUav2cUtMU1N0inmFHSF/2x0d9IWEpVzE kRc30PvmEHI1faQit7NepnHkkphrXLAoZukAoNP3PB8NRQ6lRF6/6e8siUgJtmPL Af9IZOv4PI51gg6ICLKzNO9i3bcUx4yeG2vjMOUAvsLkhSTWob0RxWppo6Pn6MOg dMQHIM5sDH0xGN0dOezzt/imAf9St2B0HQXVfAAbveXBeRoO7jj/qcGx6hWmsKUr BVzdQhBk7Sku6C2KlMtkbtzd1fj8DtnrT8XOPKGp7/Y7ASzRtBFhYmMgKHRlc3Qg a2V5KSA8PohGBBMRAgAGBQJNM+p5AAoJEC3Jkh8+bnkuNEoAnj2QnqGtdlTgUXCQ Fyvwk5wiLGPfAJ4jTGTL62nWzsgrCDIMIfEG2shm8bjMBE0z6ngQAgCUlP7AlfO4 XuKGVCs4NvyBpd0KA0m0wjndOHRNSIz44x24vLfTO0GrueWjPMqRRLHO8zLJS/BX O/BHo6ypjN87Af0VPV1hcq20MEW2iujh3hBwthNwBWhtKdPXOndJGZaB7lshLJuW v9z6WyDNXj/SBEiV1gnPm0ELeg8Syhy5pCjMAgCFEc+NkCzcUOJkVpgLpk+VLwrJ /Wi9q+yCihaJ4EEFt/7vzqmrooXWz2vMugD1C+llN6HkCHTnuMH07/E/2dzciEYE GBECAAYFAk0z6nkACgkQLcmSHz5ueS7NTwCdED1P9NhgR2LqwyS+AEyqlQ0d5joA oK9xPUzjg4FlB+1QTHoOhuokxxyN =CTgL -----END PGP PUBLIC KEY BLOCK----- the public key packet of the key is mOIETTPqeBECALx+i9PIc4MB2DYXeqsWUav2cUtMU1N0inmFHSF/2x0d9IWEpVzEkRc30PvmEHI1faQi t7NepnHkkphrXLAoZukAoNP3PB8NRQ6lRF6/6e8siUgJtmPLAf9IZOv4PI51gg6ICLKzNO9i3bcUx4ye G2vjMOUAvsLkhSTWob0RxWppo6Pn6MOgdMQHIM5sDH0xGN0dOezzt/imAf9St2B0HQXVfAAbveXBeRoO 7jj/qcGx6hWmsKUrBVzdQhBk7Sku6C2KlMtkbtzd1fj8DtnrT8XOPKGp7/Y7ASzR in radix 64 i have tried many different combinations of sha1(< some data + 'abcd'),but the calculated value v never equals r, of the signature i know that the pgp implementation i used to create the key and signature is correct. i also know that my DSA implementation and PGP key data extraction program are correct. thus, the only thing left is the data to hash. what is the correct data to be hashed?

    Read the article

  • how to view encrypted picture

    - by calccrypto
    how do people view encrypted pictures like on this wiki page? is there a special program to do it, or did someone decide to do some silly xor just make a point about ECB? im not a graphics person, so if there are programs to view encrypted pictures, what are they?

    Read the article

  • pgp key information

    - by calccrypto
    can someone show a description of the information of what a pgp looks like if only the descriptions were there but not the actual information? something like (i dont remember if the values are correct): packet-type[4 bits], total length in bytes[16 bits], packet version type [4 bits], creation-time[32 bits], encryption-algorithm[8 bits], ...,etc,etc ive tried to understand rfc4880, but its tedious and confusing. so far, i am think i have extracted the 4 i wrote above, but i cant seem to get the rest of the information out. can anyone help? i know i can just find some pgp program, but the whole point of this is to allow me to learn how those programs work in the first place

    Read the article

  • Searching through large data set

    - by calccrypto
    how would i search through a list with ~5 mil 128bit (or 256, depending on how you look at it) strings quickly and find the duplicates (in python)? i can turn the strings into numbers, but i don't think that's going to help much. since i haven't learned much information theory, is there anything about this in information theory? and since these are hashes already, there's no point in hashing them again

    Read the article

  • Is there a free pgp key dumping program?

    - by calccrypto
    is there any pgp key dumping program like http://www.pgpdump.net/ that also shows the MPI values as well as the other information? the linked website's program will print out ... for the long MPI, which is perfectly logical, but I want to see the values since my program is for some reason getting all but one part right (reading an elgamal public key), and its messing with everything that comes afterwards. i want to see where im off by a few bits

    Read the article

  • How to get bit rotation function to accept any bit size?

    - by calccrypto
    i have these 2 functions i got from some other code def ROR(x, n): mask = (2L**n) - 1 mask_bits = x & mask return (x >> n) | (mask_bits << (32 - n)) def ROL(x, n): return ROR(x, 32 - n) and i wanted to use them in a program, where 16 bit rotations are required. however, there are also other functions that require 32 bit rotations, so i wanted to leave the 32 in the equation, so i got: def ROR(x, n, bits = 32): mask = (2L**n) - 1 mask_bits = x & mask return (x >> n) | (mask_bits << (bits - n)) def ROL(x, n, bits = 32): return ROR(x, bits - n) however, the answers came out wrong when i tested this set out. yet, the values came out correctly when the code is def ROR(x, n): mask = (2L**n) - 1 mask_bits = x & mask return (x >> n) | (mask_bits << (16 - n)) def ROL(x, n,bits): return ROR(x, 16 - n) what is going on and how do i fix this?

    Read the article

  • How to show why "try" failed in python

    - by calccrypto
    is there anyway to show why a "try" failed, and skipped to "except", without writing out all the possible errors by hand, and without ending the program? example: try: 1/0 except: someway to show "Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> 1/0 ZeroDivisionError: integer division or modulo by zero" i dont want to doif:print error 1, elif: print error 2, elif: etc.... i want to see the error that would be shown had try not been there

    Read the article

  • is this a correct way to generate rsa keys?

    - by calccrypto
    is this code going to give me correct values for RSA keys (assuming that the other functions are correct)? im having trouble getting my program to decrypt properly, as in certain blocks are not decrypting properly this is in python: import random def keygen(bits): p = q = 3 while p == q: p = random.randint(2**(bits/2-2),2**(bits/2)) q = random.randint(2**(bits/2-2),2**(bits/2)) p += not(p&1) # changes the values from q += not(q&1) # even to odd while MillerRabin(p) == False: # checks for primality p -= 2 while MillerRabin(q) == False: q -= 2 n = p * q tot = (p-1) * (q-1) e = tot while gcd(tot,e) != 1: e = random.randint(3,tot-1) d = getd(tot,e) # gets the multiplicative inverse while d<0: # i can probably replace this with mod d = d + tot return e,d,n one set of keys generated: e = 3daf16a37799d3b2c951c9baab30ad2d d = 16873c0dd2825b2e8e6c2c68da3a5e25 n = dc2a732d64b83816a99448a2c2077ced

    Read the article

  • Reading PGP key information

    - by calccrypto
    can someone show a description of the information of what a pgp looks like if only the descriptions were there but not the actual information? something like (i dont remember if the values are correct): packet-type[4 bits], total length in bytes[16 bits], packet version type [4 bits], creation-time[32 bits], encryption-algorithm[8 bits], ...,etc,etc ive tried to understand rfc4880, but its tedious and confusing. so far, i am think i have extracted the 4 i wrote above, but i cant seem to get the rest of the information out. can anyone help? i know i can just find some pgp program, but the whole point of this is to allow me to learn how those programs work in the first place

    Read the article

  • analyzing hashes

    - by calccrypto
    Is anyone willing to devote some time to helping me analyze a (hopefully cryptographically secure) hash? I honestly have no idea what im doing, so i need someone to show me how to, to teach me. almost all of the stuff ive found online have been really long, tedious, and vague the code is in python because for some reason i dont know c/c++. all i know about the hash: 1. there are no collisions (so far) and 2. differences between two similar inputs results in wildly different differences and please dont tell me that if i dont know what im doing, i shouldnt be doing it.

    Read the article

  • defining information out of class

    - by calccrypto
    is there a way to define a value within a class in the __init__ part, send it to some variable outside of the class without calling another function within the class? like class c: def __init__(self, a): self.a = a b = 4 # do something like this so that outside of class c, # b is set to 4 automatically when i use class c def function(self): ... # whatever. this doesnt matter i have multiple classes that have different values for b. i could just make a list that tells the computer to change b, but i would rather set b within each class

    Read the article

  • RSA encrypted data block size

    - by calccrypto
    how do you store an rsa encrypted data block? the output might be significantly greater than the original input data block size, and i dont think people waste memory by padding bucket loads of 0s in front of each data block. besides, how would they be removed? or is each block stored on new lines within the file? if that is the case, how would you tell the difference between legitimate new line and a '\n' char written into the file? what am i missing? im writing the "write to file" part in python, so maybe its one of the differences between: open(file,'w') open(file,'w+b') open(file,'wb') that i dont know. or is it something else?

    Read the article

  • variable being weirdly deleted

    - by calccrypto
    im having a weird problem with one variable: its not being recognized but its still printing. i would post my code, but it is massive. the basic idea is: # pseudocode def function(stuff): <do stuff> # These are the only 2 conditions if tag == 3: pka = <a string> if tag == 4: pka = <a string> print pka # (1) print pka # (2) <do stuff not modifying pka> print pka # (3) if pka == 'RSA': <do stuff> elif pka == 'DSA': <do stuff> my code will error at (2). however, it will print out (1), (2), and (3), all of which are the same. is there any general explanation of why this is happening? if my code is really needed, i will post it, but otherwise, i would rather not due to its size update: now the code will error at the if statement after (3), saying UnboundLocalError: local variable 'pka' referenced before assignment even though (1),(2),(3) just printed

    Read the article

  • how to exit recursive math formula and still get an answer

    - by calccrypto
    i wrote this python code, which from wolfram alpha says that its supposed to return the factorial of any positive value (i probably messed up somewhere), integer or not: from math import * def double_factorial(n): if int(n) == n: n = int(n) if [0,1].__contains__(n): return 1 a = (n&1) + 2 b = 1 while a<=n: b*=a a+= 2 return float(b) else: return factorials(n/2) * 2**(n/2) *(pi/2)**(.25 *(-1+cos(n * pi))) def factorials(n): return pi**(.5 * sin(n*pi)**2) * 2**(-n + .25 * (-1 + cos(2*n*pi))) * double_factorial(2*n) the problem is , say i input pi to 6 decimal places. 2*n will not become a float with 0 as its decimals any time soon, so the equation turns out to be pi**(.5 * sin(n*pi)**2) * 2**(-n + .25 * (-1 + cos(2*n*pi))) * double_factorial(loop(loop(loop(...))))) how would i stop the recursion and still get the answer? ive had suggestions to add an index to the definitions or something, but the problem is, if the code stops when it reaches an index, there is still no answer to put back into the previous "nests" or whatever you call them

    Read the article

1 2  | Next Page >