VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Expand)AuthorFilesLines
2015-08-27Windows: Solve various issues in HotKeys assignment dialog by ensuring that k...Mounir IDRASSI1-3/+73
2015-08-16Windows: Solve wrong PKCS-5 PRF label disabled in dialog for Add/Remove Keyfi...Mounir IDRASSI1-2/+2
2015-08-16Windows: Solve UI language change not taken into account for new install unle...Mounir IDRASSI4-67/+44
2015-08-14Language XML: use correct abbreviation for VeraCrypt Rescue Disk (VRD instead...Mounir IDRASSI1-1/+1
2015-08-14Windows Driver: support returning StorageDeviceProperty through IOCTL_STORAGE...Mounir IDRASSI1-16/+37
2015-08-14Windows: solve issue of option "Cache password in driver memory" not read on ...Mounir IDRASSI1-0/+3
2015-08-09Increment version to 1.13VeraCrypt_1.13Mounir IDRASSI11-28/+28
2015-08-09Windows: better error code when IOCTL_STORAGE_QUERY_PROPERTY type is not supp...Mounir IDRASSI1-1/+1
2015-08-09Windows: Solve crash of TOR when run from VeraCrypt volume by explicitly retu...Mounir IDRASSI1-0/+4
2015-08-06Linux: modify official build script to use different build directories for wx...VeraCrypt_1.12Mounir IDRASSI1-3/+14
2015-08-06Linux: Correct formating of license displayed in the installerMounir IDRASSI1-24/+24
2015-08-06Increment version to 1.12. Update user guide PDF file.Mounir IDRASSI11-29/+29
2015-08-06Update license information to reflect the use of a dual license Apache 2.0 an...Mounir IDRASSI377-2271/+4181
2015-08-06Windows: Add extra checks for bootloader tampering.Mounir IDRASSI2-7/+35
2015-07-29Windows: Implement Evil-Maid-Attack detection mechanism. Write the correct bo...Mounir IDRASSI10-8/+221
2015-07-25Linux/MacOSX: remove unused variable.Mounir IDRASSI1-2/+0
2015-07-25Linux: solve compilation error on OpenSUSE when linking against system wxWidg...Mounir IDRASSI1-1/+1
2015-07-19Linux: Add "new-hash" switch for changing PRF and remove "current-hash" switc...Mounir IDRASSI3-7/+7
2015-07-19User Interface enhancements for PIMMounir IDRASSI12-54/+305
2015-07-14Windows: Don't offer "None" as wipe mode when real wipe is explicitly needed ...Mounir IDRASSI1-1/+1
2015-07-14Windows: in encryption wizard, clicking "Previous" in the "Large File Support...Mounir IDRASSI1-0/+2
2015-07-14Windows: solve issue introduced by the new "Use PIM" checkbox that caused err...Mounir IDRASSI1-2/+1
2015-07-13Windows: on 64-bit Windows, more System favorite service from SysWoW64 to Sys...Mounir IDRASSI6-37/+94
2015-07-13Windows: Fix memory access issues when processing language XML files. Avoid w...Mounir IDRASSI1-10/+53
2015-07-13Windows: workaround to solve system favorites failing to mount because underl...Mounir IDRASSI1-122/+183
2015-07-13Windows: Modify PIM parts in GUI to make it easier to use. Users must explici...Mounir IDRASSI14-58/+219
2015-07-13Windows: Solve failure to create hidden volume when PIM used for outer volume...Mounir IDRASSI1-3/+2
2015-07-13Windows: Set longer wait hint time for System Favorites Service to avoid bein...Mounir IDRASSI1-8/+81
2015-07-11Linux: Solve compilation warning (unused variables, pointer cast)Mounir IDRASSI4-10/+1
2015-07-11Linux: Solve error when building against dynamic wxWidgets library, especiall...Mounir IDRASSI2-0/+5
2015-07-11Use Pim name for internal variables instead of the old name PinMounir IDRASSI42-350/+350
2015-07-08Windows: Fix old issue inherited from TrueCrypt by initializing COM library b...Mounir IDRASSI1-0/+4
2015-07-08Windows: Disable Set Key Header Algorithm item in "Volumes" menu when the sys...Mounir IDRASSI1-0/+14
2015-07-07Windows: Disable menu item for changing system header key derivation algorith...Mounir IDRASSI1-1/+4
2015-07-06Windows: better logic for FormatEx function call. To be replaced in the futur...Mounir IDRASSI2-10/+81
2015-07-06Windows: Display source location of errors in order to help diagnose issues r...Mounir IDRASSI23-227/+270
2015-07-04Linux: Support checking/reparing mounted filesystem on KDE when xterm not ava...Mounir IDRASSI1-0/+25
2015-07-03Windows: re-size some controls to avoid text truncation.Mounir IDRASSI1-4/+4
2015-07-03Windows: Solve privacy issue inherited from TrueCrypt and linked to the updat...Mounir IDRASSI4-161/+338
2015-07-03Language XML: Add newlines to PIM Help Text to make clearer for readingMounir IDRASSI1-2/+2
2015-07-03Windows: Explicitly use internal PKCS#11 headers for buildingMounir IDRASSI3-10/+10
2015-06-28Linux/MacOSX: Add dedicated PIM page in the volume creation wizard. Correct P...Mounir IDRASSI11-10/+660
2015-06-26Linux: don't ask for PIM if TrueCryptMode enabled, both in command line and GUIMounir IDRASSI6-13/+36
2015-06-24Linux: if a keyfile is specified in the command line without a password, don'...Mounir IDRASSI1-1/+1
2015-06-24Linux/MacOSX: solve GUI layout issues although the volume creation wizard sti...Mounir IDRASSI4-9/+10
2015-06-24Linux/MacOSX: restore normal file mode to some source filesMounir IDRASSI35-0/+0
2015-06-24Linux: solve bug when "-tc" command line switch is not followed by another sw...Mounir IDRASSI1-1/+1
2015-06-24Linux/MacOSX: first dynamic mode implementationMounir IDRASSI37-105/+680
2015-06-21Windows: Add a dedicate page for volume PIM in the volume creation wizardMounir IDRASSI7-35/+125
2015-06-19Windows: in "VeraCrypt Format.exe", erase the volume PIM value after the proc...Mounir IDRASSI1-0/+3
ss="p">; /* local strm->next_in */ z_const unsigned char FAR *last; /* have enough input while in < last */ unsigned char FAR *out; /* local strm->next_out */ unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ unsigned char FAR *end; /* while out < end, enough space available */ #ifdef INFLATE_STRICT unsigned dmax; /* maximum distance from zlib header */ #endif unsigned wsize; /* window size or zero if not using window */ unsigned whave; /* valid bytes in the window */ unsigned wnext; /* window write index */ unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */ unsigned long hold; /* local strm->hold */ unsigned bits; /* local strm->bits */ code const FAR *lcode; /* local strm->lencode */ code const FAR *dcode; /* local strm->distcode */ unsigned lmask; /* mask for first level of length codes */ unsigned dmask; /* mask for first level of distance codes */ code const *here; /* retrieved table entry */ unsigned op; /* code bits, operation, extra bits, or */ /* window position, window bytes to copy */ unsigned len; /* match length, unused bytes */ unsigned dist; /* match distance */ unsigned char FAR *from; /* where to copy match from */ /* copy state to local variables */ state = (struct inflate_state FAR *)strm->state; in = strm->next_in; last = in + (strm->avail_in - 5); out = strm->next_out; beg = out - (start - strm->avail_out); end = out + (strm->avail_out - 257); #ifdef INFLATE_STRICT dmax = state->dmax; #endif wsize = state->wsize; whave = state->whave; wnext = state->wnext; window = state->window; hold = state->hold; bits = state->bits; lcode = state->lencode; dcode = state->distcode; lmask = (1U << state->lenbits) - 1; dmask = (1U << state->distbits) - 1; /* decode literals and length/distances until end-of-block or not enough input data or output space */ do { if (bits < 15) { hold += (unsigned long)(*in++) << bits; bits += 8; hold += (unsigned long)(*in++) << bits; bits += 8; } here = lcode + (hold & lmask); dolen: op = (unsigned)(here->bits); hold >>= op; bits -= op; op = (unsigned)(here->op); if (op == 0) { /* literal */ Tracevv((stderr, here->val >= 0x20 && here->val < 0x7f ? "inflate: literal '%c'\n" : "inflate: literal 0x%02x\n", here->val)); *out++ = (unsigned char)(here->val); } else if (op & 16) { /* length base */ len = (unsigned)(here->val); op &= 15; /* number of extra bits */ if (op) { if (bits < op) { hold += (unsigned long)(*in++) << bits; bits += 8; } len += (unsigned)hold & ((1U << op) - 1); hold >>= op; bits -= op; } Tracevv((stderr, "inflate: length %u\n", len)); if (bits < 15) { hold += (unsigned long)(*in++) << bits; bits += 8; hold += (unsigned long)(*in++) << bits; bits += 8; } here = dcode + (hold & dmask); dodist: op = (unsigned)(here->bits); hold >>= op; bits -= op; op = (unsigned)(here->op); if (op & 16) { /* distance base */ dist = (unsigned)(here->val); op &= 15; /* number of extra bits */ if (bits < op) { hold += (unsigned long)(*in++) << bits; bits += 8; if (bits < op) { hold += (unsigned long)(*in++) << bits; bits += 8; } } dist += (unsigned)hold & ((1U << op) - 1); #ifdef INFLATE_STRICT if (dist > dmax) { strm->msg = (char *)"invalid distance too far back"; state->mode = BAD; break; } #endif hold >>= op; bits -= op; Tracevv((stderr, "inflate: distance %u\n", dist)); op = (unsigned)(out - beg); /* max distance in output */ if (dist > op) { /* see if copy from window */ op = dist - op; /* distance back in window */ if (op > whave) { if (state->sane) { strm->msg = (char *)"invalid distance too far back"; state->mode = BAD; break; } #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR if (len <= op - whave) { do { *out++ = 0; } while (--len); continue; } len -= op - whave; do { *out++ = 0; } while (--op > whave); if (op == 0) { from = out - dist; do { *out++ = *from++; } while (--len); continue; } #endif } from = window; if (wnext == 0) { /* very common case */ from += wsize - op; if (op < len) { /* some from window */ len -= op; do { *out++ = *from++; } while (--op); from = out - dist; /* rest from output */ } } else if (wnext < op) { /* wrap around window */ from += wsize + wnext - op; op -= wnext; if (op < len) { /* some from end of window */ len -= op; do { *out++ = *from++; } while (--op); from = window; if (wnext < len) { /* some from start of window */ op = wnext; len -= op; do { *out++ = *from++; } while (--op); from = out - dist; /* rest from output */ } } } else { /* contiguous in window */ from += wnext - op; if (op < len) { /* some from window */ len -= op; do { *out++ = *from++; } while (--op); from = out - dist; /* rest from output */ } } while (len > 2) { *out++ = *from++; *out++ = *from++; *out++ = *from++; len -= 3; } if (len) { *out++ = *from++; if (len > 1) *out++ = *from++; } } else { from = out - dist; /* copy direct from output */ do { /* minimum length is three */ *out++ = *from++; *out++ = *from++; *out++ = *from++; len -= 3; } while (len > 2); if (len) { *out++ = *from++; if (len > 1) *out++ = *from++; } } } else if ((op & 64) == 0) { /* 2nd level distance code */ here = dcode + here->val + (hold & ((1U << op) - 1)); goto dodist; } else { strm->msg = (char *)"invalid distance code"; state->mode = BAD; break; } } else if ((op & 64) == 0) { /* 2nd level length code */ here = lcode + here->val + (hold & ((1U << op) - 1)); goto dolen; } else if (op & 32) { /* end-of-block */ Tracevv((stderr, "inflate: end of block\n")); state->mode = TYPE; break; } else { strm->msg = (char *)"invalid literal/length code"; state->mode = BAD; break; } } while (in < last && out < end); /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ len = bits >> 3; in -= len; bits -= len << 3; hold &= (1U << bits) - 1; /* update state and return */ strm->next_in = in; strm->next_out = out; strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last)); strm->avail_out = (unsigned)(out < end ? 257 + (end - out) : 257 - (out - end)); state->hold = hold; state->bits = bits; return; } /* inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): - Using bit fields for code structure - Different op definition to avoid & for extra bits (do & for table bits) - Three separate decoding do-loops for direct, window, and wnext == 0 - Special case for distance > 1 copies to do overlapped load and store copy - Explicit branch predictions (based on measured branch probabilities) - Deferring match copy and interspersed it with decoding subsequent codes - Swapping literal/length else - Swapping window/direct else - Larger unrolled copy loops (three is about right) - Moving len -= 3 statement into middle of loop */ #endif /* !ASMINF */