Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
“This License” refers to version 3 of the GNU General Public License.
“Copyright” also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
“The Program” refers to any copyrightable work licensed under this
License. Each licensee is addressed as “you”. “Licensees” and
“recipients” may be individuals or organizations.
To “modify” a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a “modified version” of the
earlier work or a work “based on” the earlier work.
A “covered work” means either the unmodified Program or a work based
on the Program.
To “propagate” a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To “convey” a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays “Appropriate Legal Notices”
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The “source code” for a work means the preferred form of the work
for making modifications to it. “Object code” means any non-source
form of a work.
A “Standard Interface” means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The “System Libraries” of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
“Major Component”, in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The “Corresponding Source” for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
“keep intact all notices”.
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
“aggregate” if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A “User Product” is either (1) a “consumer product”, which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, “normally used” refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
“Installation Information” for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
“Additional permissions” are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered “further
restrictions” within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An “entity transaction” is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A “contributor” is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's “contributor version”.
A contributor's “essential patent claims” are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, “control” includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a “patent license” is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To “grant” such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. “Knowingly relying” means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is “discriminatory” if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License “or any later version” applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the “copyright” line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an “about box”.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a “copyright disclaimer” for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
GostCrypt_MacOSX_1.0/._License.txt 000755 000765 000024 00000000261 12352024344 017037 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/License.txt 000755 000765 000024 00000104513 12352024344 016627 0 ustar 00cvo staff 000000 000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
GostCrypt_MacOSX_1.0/._Main 000755 000765 000024 00000000261 12433043720 015522 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Main/ 000755 000765 000024 00000000000 12433043720 015360 5 ustar 00cvo staff 000000 000000 GostCrypt_MacOSX_1.0/Makefile 000755 000765 000024 00000020041 12433043720 016134 0 ustar 00cvo staff 000000 000000 #------ Command line arguments ------
# DEBUG: Disable optimizations and enable debugging checks
# DEBUGGER: Enable debugging information for use by debuggers
# NOASM: Exclude modules requiring assembler
# NOGUI: Disable graphical user interface (build console-only application)
# NOSTRIP: Do not strip release binary
# NOTEST: Do not test release binary
# RESOURCEDIR: Run-time resource directory
# VERBOSE: Enable verbose messages
# WXSTATIC: Use static wxWidgets library
#------ Targets ------
# all
# clean
# wxbuild: Configure and build wxWidgets - source code must be located at $(WX_ROOT)
#------ Build configuration ------
export APPNAME := gostcrypt
export BASE_DIR := $(CURDIR)
export BUILD_INC := $(BASE_DIR)/Build/Include
export AR ?= ar
export CC ?= gcc
export CXX ?= g++
export AS := nasm
export RANLIB ?= ranlib
export CFLAGS := -Wall
export CXXFLAGS := -Wall -Wno-unused-parameter
C_CXX_FLAGS := -MMD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -I$(BASE_DIR) -I$(BASE_DIR)/Crypto
export ASFLAGS := -Ox -D __GNUC__
export LFLAGS :=
export PKG_CONFIG_PATH ?= /usr/local/lib/pkgconfig
export WX_CONFIG ?= wx-config
export WX_CONFIG_ARGS := --unicode
WX_CONFIGURE_FLAGS :=
export WXCONFIG_CFLAGS := `wx-config --cflags`
export WXCONFIG_CXXFLAGS := `wx-config --cxxflags`
WX_ROOT ?= ../wxWidgets-3.0.1
export GST_BUILD_CONFIG := Release
ifeq "$(origin DEBUG)" "command line"
ifneq "$(DEBUG)" "0"
GST_BUILD_CONFIG := Debug
endif
endif
ifeq "$(origin NOGUI)" "command line"
export GST_NO_GUI := 1
C_CXX_FLAGS += -DGST_NO_GUI
WX_CONFIGURE_FLAGS += --disable-gui
endif
ifdef PKCS11_INC
C_CXX_FLAGS += -I$(PKCS11_INC)
endif
ifeq "$(origin RESOURCEDIR)" "command line"
C_CXX_FLAGS += -DGST_RESOURCE_DIR="$(RESOURCEDIR)"
endif
ifneq "$(origin VERBOSE)" "command line"
MAKEFLAGS += -s
endif
ifeq "$(origin WXSTATIC)" "command line"
WX_CONFIG = $(WX_BUILD_DIR)/wx-config
WX_CONFIG_ARGS += --static
endif
#------ Release configuration ------
ifeq "$(GST_BUILD_CONFIG)" "Release"
C_CXX_FLAGS += -O2 -fno-strict-aliasing # Do not enable strict aliasing
export WX_BUILD_DIR ?= $(BASE_DIR)/wxrelease
WX_CONFIGURE_FLAGS += --disable-debug_flag --disable-debug_gdb --disable-debug_info
else
#------ Debug configuration ------
C_CXX_FLAGS += -DDEBUG
CXXFLAGS += -fno-default-inline -Wno-unused-function -Wno-unused-variable
export WX_BUILD_DIR ?= $(BASE_DIR)/wxdebug
WX_CONFIGURE_FLAGS += --enable-debug_flag --disable-debug_gdb --disable-debug_info
endif
#------ Debugger configuration ------
ifeq "$(origin DEBUGGER)" "command line"
C_CXX_FLAGS += -ggdb
WX_CONFIGURE_FLAGS += --enable-debug_gdb --enable-debug_info
endif
#------ Platform configuration ------
export PLATFORM := "Unknown"
export PLATFORM_UNSUPPORTED := 0
export CPU_ARCH ?= x64
ARCH = $(shell uname -p)
ifeq "$(ARCH)" "unknown"
ARCH = $(shell uname -m)
endif
ifneq (,$(filter i386 i486 i586 i686 x86,$(ARCH)))
CPU_ARCH = x86
ASM_OBJ_FORMAT = elf32
else ifneq (,$(filter x86_64 x86-64 amd64 x64,$(ARCH)))
CPU_ARCH = x64
ASM_OBJ_FORMAT = elf64
endif
ifeq "$(origin NOASM)" "command line"
CPU_ARCH = unknown
endif
ifeq "$(CPU_ARCH)" "x86"
C_CXX_FLAGS += -D GST_ARCH_X86
else ifeq "$(CPU_ARCH)" "x64"
C_CXX_FLAGS += -D GST_ARCH_X64
endif
#------ Linux configuration ------
ifeq "$(shell uname -s)" "Linux"
PLATFORM := Linux
C_CXX_FLAGS += -DGST_UNIX -DGST_LINUX
ifeq "$(GST_BUILD_CONFIG)" "Release"
C_CXX_FLAGS += -fdata-sections -ffunction-sections
LFLAGS += -Wl,--gc-sections
ifneq "$(shell ld --help 2>&1 | grep sysv | wc -l)" "0"
LFLAGS += -Wl,--hash-style=sysv
endif
WXCONFIG_CFLAGS += -fdata-sections -ffunction-sections
WXCONFIG_CXXFLAGS += -fdata-sections -ffunction-sections
endif
endif
#------ Mac OS X configuration ------
ifeq "$(shell uname -s)" "Darwin"
PLATFORM := MacOSX
APPNAME := GostCrypt
GST_OSX_SDK ?= /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
CC := gcc
CXX := g++
C_CXX_FLAGS += -DGST_UNIX -DGST_BSD -DGST_MACOSX -mmacosx-version-min=10.9 -isysroot $(GST_OSX_SDK) -D_XOPEN_SOURCE
LFLAGS += -mmacosx-version-min=10.9 -Wl,-syslibroot $(GST_OSX_SDK)
WX_CONFIGURE_FLAGS += --with-macosx-version-min=10.9 --with-macosx-sdk=$(GST_OSX_SDK)
ifeq "$(CPU_ARCH)" "x64"
CPU_ARCH = x86
endif
ASM_OBJ_FORMAT = macho
ASFLAGS += --prefix _
ifeq "$(GST_BUILD_CONFIG)" "Release"
export DISABLE_PRECOMPILED_HEADERS := 1
S := $(C_CXX_FLAGS)
C_CXX_FLAGS = $(subst -MMD,,$(S))
C_CXX_FLAGS += -gfull
LFLAGS += -Wl,-dead_strip
# WX_CONFIGURE_FLAGS += --enable-universal_binary
WXCONFIG_CFLAGS += -gfull
WXCONFIG_CXXFLAGS += -gfull
else
WX_CONFIGURE_FLAGS += --disable-universal_binary
endif
endif
#------ FreeBSD configuration ------
ifeq "$(shell uname -s)" "FreeBSD"
PLATFORM := FreeBSD
PLATFORM_UNSUPPORTED := 1
C_CXX_FLAGS += -DGST_UNIX -DGST_BSD -DGST_FREEBSD
endif
#------ Solaris configuration ------
ifeq "$(shell uname -s)" "SunOS"
PLATFORM := Solaris
PLATFORM_UNSUPPORTED := 1
C_CXX_FLAGS += -DGST_UNIX -DGST_SOLARIS
WX_CONFIGURE_FLAGS += --with-gtk
endif
#------ Common configuration ------
CFLAGS := $(C_CXX_FLAGS) $(CFLAGS) $(GST_EXTRA_CFLAGS)
CXXFLAGS := $(C_CXX_FLAGS) $(CXXFLAGS) $(GST_EXTRA_CXXFLAGS)
ASFLAGS += -f $(ASM_OBJ_FORMAT)
LFLAGS := $(LFLAGS) $(GST_EXTRA_LFLAGS)
WX_CONFIGURE_FLAGS += --enable-unicode -disable-shared --disable-dependency-tracking --disable-compat26 --enable-exceptions --enable-std_string --enable-dataobj --enable-mimetype \
--disable-protocol --disable-protocols --disable-url --disable-ipc --disable-sockets --disable-fs_inet --disable-ole --disable-docview --disable-clipboard \
--disable-help --disable-html --disable-mshtmlhelp --disable-htmlhelp --disable-mdi --disable-metafile --disable-webkit \
--disable-xrc --disable-aui --disable-postscript --disable-printarch \
--disable-arcstream --disable-fs_archive --disable-fs_zip --disable-tarstream --disable-zipstream \
--disable-animatectrl --disable-bmpcombobox --disable-calendar --disable-caret --disable-checklst --disable-collpane --disable-colourpicker --disable-comboctrl \
--disable-datepick --disable-display --disable-dirpicker --disable-filepicker --disable-fontpicker --disable-grid --disable-dataviewctrl \
--disable-listbook --disable-odcombobox --disable-sash --disable-searchctrl --disable-slider --disable-splitter --disable-togglebtn \
--disable-toolbar --disable-tbarnative --disable-treebook --disable-toolbook --disable-tipwindow --disable-popupwin \
--disable-commondlg --disable-aboutdlg --disable-coldlg --disable-finddlg --disable-fontdlg --disable-numberdlg --disable-splash \
--disable-tipdlg --disable-progressdlg --disable-wizarddlg --disable-miniframe --disable-tooltips --disable-splines --disable-palette \
--disable-richtext --disable-dialupman --disable-debugreport --disable-filesystem \
--disable-graphics_ctx --disable-sound --disable-mediactrl --disable-joystick --disable-apple_ieee \
--disable-gif --disable-pcx --disable-tga --disable-iff --disable-gif --disable-pnm \
--without-expat --without-libtiff --without-libjpeg --without-libpng -without-regex --without-zlib
#------ Project build ------
PROJ_DIRS := Platform Volume Driver/Fuse Core Main
.PHONY: all clean wxbuild
all clean:
@if pwd | grep -q ' '; then echo 'Error: source code is stored in a path containing spaces' >&2; exit 1; fi
@for DIR in $(PROJ_DIRS); do \
PROJ=$$(echo $$DIR | cut -d/ -f1); \
$(MAKE) -C $$DIR -f $$PROJ.make NAME=$$PROJ $(MAKECMDGOALS) || exit $?; \
export LIBS="$(BASE_DIR)/$$DIR/$$PROJ.a $$LIBS"; \
done
#------ wxWidgets build ------
ifeq "$(MAKECMDGOALS)" "wxbuild"
CFLAGS :=
CXXFLAGS :=
LFLAGS :=
endif
wxbuild:
ifneq "$(shell test -f $(WX_ROOT)/configure || test -f $(WX_BUILD_DIR)/../configure && echo 1)" "1"
@echo 'Error: WX_ROOT must point to wxWidgets source code directory' >&2
@exit 1
endif
rm -rf "$(WX_BUILD_DIR)"
mkdir -p "$(WX_BUILD_DIR)"
@echo Configuring wxWidgets library...
cd "$(WX_BUILD_DIR)" && "$(WX_ROOT)/configure" $(WX_CONFIGURE_FLAGS) >/dev/null
@echo Building wxWidgets library...
cd "$(WX_BUILD_DIR)" && $(MAKE)
GostCrypt_MacOSX_1.0/._Mount 000755 000765 000024 00000000261 12361425666 015755 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Mount/ 000755 000765 000024 00000000000 12361425666 015613 5 ustar 00cvo staff 000000 000000 GostCrypt_MacOSX_1.0/._Platform 000755 000765 000024 00000000261 12433043720 016422 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Platform/ 000755 000765 000024 00000000000 12433043720 016260 5 ustar 00cvo staff 000000 000000 GostCrypt_MacOSX_1.0/._Readme.txt 000755 000765 000024 00000000261 12352024604 016651 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Readme.txt 000755 000765 000024 00000000066 12352024604 016437 0 ustar 00cvo staff 000000 000000 This archive contains the source code of GostCrypt 1.0 GostCrypt_MacOSX_1.0/._Release 000755 000765 000024 00000000261 12361425666 016233 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Release/ 000755 000765 000024 00000000000 12361425666 016071 5 ustar 00cvo staff 000000 000000 GostCrypt_MacOSX_1.0/._Resources 000755 000765 000024 00000000261 12433043441 016610 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Resources/ 000755 000765 000024 00000000000 12433043441 016446 5 ustar 00cvo staff 000000 000000 GostCrypt_MacOSX_1.0/._Volume 000755 000765 000024 00000000261 12361425667 016123 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/ 000755 000765 000024 00000000000 12361425667 015761 5 ustar 00cvo staff 000000 000000 GostCrypt_MacOSX_1.0/Volume/._Cipher.cpp 000755 000765 000024 00000000261 12361324353 020104 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/Cipher.cpp 000755 000765 000024 00000006362 12361324353 017677 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008-2010 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "Platform/Platform.h"
#include "Cipher.h"
#include "Crypto/GostCipher.h"
namespace GostCrypt
{
Cipher::Cipher () : Initialized (false)
{
}
Cipher::~Cipher ()
{
}
void Cipher::DecryptBlock (byte *data) const
{
if (!Initialized)
throw NotInitialized (SRC_POS);
Decrypt (data);
}
void Cipher::DecryptBlocks (byte *data, size_t blockCount) const
{
if (!Initialized)
throw NotInitialized (SRC_POS);
while (blockCount-- > 0)
{
Decrypt (data);
data += GetBlockSize();
}
}
void Cipher::EncryptBlock (byte *data) const
{
if (!Initialized)
throw NotInitialized (SRC_POS);
Encrypt (data);
}
void Cipher::EncryptBlocks (byte *data, size_t blockCount) const
{
if (!Initialized)
throw NotInitialized (SRC_POS);
while (blockCount-- > 0)
{
Encrypt (data);
data += GetBlockSize();
}
}
CipherList Cipher::GetAvailableCiphers ()
{
CipherList l;
l.push_back (shared_ptr (new CipherGOST ()));
return l;
}
void Cipher::SetKey (const ConstBufferPtr &key)
{
if (key.Size() != GetKeySize ())
throw ParameterIncorrect (SRC_POS);
if (!Initialized)
ScheduledKey.Allocate (GetScheduledKeySize ());
SetCipherKey (key);
Key.CopyFrom (key);
Initialized = true;
KeySwapped = false;
}
void Cipher::StoreCipherKey ()
{
SwapScheduledKey.CopyFrom ((ConstBufferPtr) ScheduledKey);
KeySwapped = true;
}
void Cipher::RestoreCipherKey ()
{
ScheduledKey.CopyFrom ((ConstBufferPtr) SwapScheduledKey);
KeySwapped = false;
}
bool Cipher::IsKeySwapped ()
{
return KeySwapped;
}
#define GST_EXCEPTION(TYPE) GST_SERIALIZER_FACTORY_ADD(TYPE)
#undef GST_EXCEPTION_NODECL
#define GST_EXCEPTION_NODECL(TYPE) GST_SERIALIZER_FACTORY_ADD(TYPE)
GST_SERIALIZER_FACTORY_ADD_EXCEPTION_SET (CipherException);
// GOST
void CipherGOST::Decrypt (byte *data) const
{
gost_decrypt (data, data, (gost_kds *) ScheduledKey.Ptr());
}
void CipherGOST::Encrypt (byte *data) const
{
gost_encrypt (data, data, (gost_kds *) ScheduledKey.Ptr());
}
void CipherGOST::DecryptWithKS (byte *data, byte *ks) const
{
gost_decrypt (data, data, (gost_kds *) ks);
}
void CipherGOST::EncryptWithKS (byte *data, byte *ks) const
{
gost_encrypt (data, data, (gost_kds *) ks);
}
size_t CipherGOST::GetScheduledKeySize () const
{
return sizeof(gost_kds);
}
void CipherGOST::SetCipherKey (const byte *key)
{
gost_set_key ((byte *)key, (gost_kds *)ScheduledKey.Ptr());
}
void CipherGOST::XorCipherKey (byte *ks, byte *data, int len) const
{
gost_xor_ks((gost_kds *) ScheduledKey.Ptr(), (gost_kds *) ks, (unsigned int *)data, len / sizeof(unsigned int));
}
void CipherGOST::CopyCipherKey (byte *ks) const
{
size_t i;
size_t size = ScheduledKey.Size();
byte *ptr = ScheduledKey.Ptr();
for (i = 0; i < size; i++)
ks[i] = ptr[i];
}
bool Cipher::HwSupportEnabled = false;
}
GostCrypt_MacOSX_1.0/Volume/._Cipher.h 000755 000765 000024 00000000261 12361324353 017551 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/Cipher.h 000755 000765 000024 00000010712 12361324353 017336 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008-2010 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Encryption_Ciphers
#define GST_HEADER_Encryption_Ciphers
#include "Platform/Platform.h"
namespace GostCrypt
{
class Cipher;
typedef vector < shared_ptr > CipherList;
class Cipher
{
public:
virtual ~Cipher ();
virtual void DecryptBlock (byte *data) const;
virtual void DecryptBlocks (byte *data, size_t blockCount) const;
static void EnableHwSupport (bool enable) { HwSupportEnabled = enable; }
virtual void EncryptBlock (byte *data) const;
virtual void EncryptBlocks (byte *data, size_t blockCount) const;
static CipherList GetAvailableCiphers ();
virtual size_t GetBlockSize () const = 0;
virtual const SecureBuffer &GetKey () const { return Key; }
virtual size_t GetKeySize () const = 0;
virtual wstring GetName () const = 0;
virtual shared_ptr GetNew () const = 0;
virtual bool IsHwSupportAvailable () const { return false; }
static bool IsHwSupportEnabled () { return HwSupportEnabled; }
virtual void SetKey (const ConstBufferPtr &key);
virtual void StoreCipherKey ();
virtual void RestoreCipherKey ();
virtual bool IsKeySwapped ();
virtual void XorCipherKey (byte *ks, byte *data, int len) const = 0;
virtual void EncryptWithKS (byte *data, byte *ks) const = 0;
virtual void DecryptWithKS (byte *data, byte *ks) const = 0;
virtual void CopyCipherKey (byte *ks) const = 0;
static const int MaxBlockSize = 16;
protected:
Cipher ();
virtual void Decrypt (byte *data) const = 0;
virtual void Encrypt (byte *data) const = 0;
virtual size_t GetScheduledKeySize () const = 0;
virtual void SetCipherKey (const byte *key) = 0;
static bool HwSupportEnabled;
bool Initialized;
SecureBuffer Key;
SecureBuffer ScheduledKey;
SecureBuffer SwapScheduledKey;
bool KeySwapped;
private:
Cipher (const Cipher &);
Cipher &operator= (const Cipher &);
};
struct CipherException : public Exception
{
protected:
CipherException () { }
CipherException (const string &message) : Exception (message) { }
CipherException (const string &message, const wstring &subject) : Exception (message, subject) { }
};
#if 0
#define GST_CIPHER(NAME, BLOCK_SIZE, KEY_SIZE) \
class GST_JOIN (Cipher,NAME) : public Cipher \
{ \
public: \
GST_JOIN (Cipher,NAME) () { } \
virtual ~GST_JOIN (Cipher,NAME) () { } \
\
virtual size_t GetBlockSize () const { return BLOCK_SIZE; }; \
virtual size_t GetKeySize () const { return KEY_SIZE; }; \
virtual wstring GetName () const { return L###NAME; }; \
virtual shared_ptr GetNew () const { return shared_ptr (new GST_JOIN (Cipher,NAME)()); } \
\
protected: \
virtual void Decrypt (byte *data) const; \
virtual void Encrypt (byte *data) const; \
virtual size_t GetScheduledKeySize () const; \
virtual void SetCipherKey (const byte *key); \
\
private: \
GST_JOIN (Cipher,NAME) (const GST_JOIN (Cipher,NAME) &); \
GST_JOIN (Cipher,NAME) &operator= (const GST_JOIN (Cipher,NAME) &); \
}
#undef GST_CIPHER
#endif
class CipherGOST : public Cipher
{
public:
CipherGOST () { }
virtual ~CipherGOST () { }
virtual size_t GetBlockSize () const { return 8; };
virtual size_t GetKeySize () const { return 32; };
virtual wstring GetName () const { return L"GOST 28147-89"; };
virtual shared_ptr GetNew () const { return shared_ptr (new CipherGOST()); }
virtual void XorCipherKey (byte *ks, byte *data, int len) const;
virtual void EncryptWithKS (byte *data, byte *ks) const;
virtual void DecryptWithKS (byte *data, byte *ks) const;
virtual void CopyCipherKey (byte *ks) const;
protected:
virtual void Decrypt (byte *data) const;
virtual void Encrypt (byte *data) const;
virtual size_t GetScheduledKeySize () const;
virtual void SetCipherKey (const byte *key);
private:
CipherGOST (const CipherGOST &);
CipherGOST &operator= (const CipherGOST &);
};
#define GST_EXCEPTION(NAME) GST_EXCEPTION_DECL(NAME,CipherException)
#undef GST_EXCEPTION_SET
#define GST_EXCEPTION_SET \
GST_EXCEPTION (CipherInitError); \
GST_EXCEPTION (WeakKeyDetected);
GST_EXCEPTION_SET;
#undef GST_EXCEPTION
}
#endif // GST_HEADER_Encryption_Ciphers
GostCrypt_MacOSX_1.0/Volume/._Crc32.h 000755 000765 000024 00000000261 12361324353 017213 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/Crc32.h 000755 000765 000024 00000001776 12361324353 017012 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Encryption_Crc32
#define GST_HEADER_Encryption_Crc32
#include "Platform/Platform.h"
#include "Common/Crc.h"
namespace GostCrypt
{
class Crc32
{
public:
Crc32 () : CrcValue (0xffffFFFF) { };
virtual ~Crc32 () { };
uint32 Get () const { return CrcValue ^ 0xffffFFFF; }
uint32 Process (byte data)
{
return CrcValue = crc_32_tab[(byte) (CrcValue ^ data)] ^ (CrcValue >> 8);
}
static uint32 ProcessBuffer (const ConstBufferPtr &buffer)
{
return ::GetCrc32 (const_cast (buffer.Get()), static_cast (buffer.Size()));
}
protected:
uint32 CrcValue;
private:
Crc32 (const Crc32 &);
Crc32 &operator= (const Crc32 &);
};
}
#endif // GST_HEADER_Encryption_Crc32
GostCrypt_MacOSX_1.0/Volume/._EncryptionAlgorithm.cpp 000755 000765 000024 00000000261 12361324353 022673 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/EncryptionAlgorithm.cpp 000755 000765 000024 00000010752 12361324353 022464 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "EncryptionAlgorithm.h"
#include "EncryptionModeCBC.h"
#include "EncryptionModeLRW.h"
#include "EncryptionModeXTS.h"
namespace GostCrypt
{
EncryptionAlgorithm::EncryptionAlgorithm () : Deprecated (false)
{
}
EncryptionAlgorithm::~EncryptionAlgorithm ()
{
}
void EncryptionAlgorithm::Decrypt (byte *data, uint64 length) const
{
if_debug (ValidateState ());
Mode->Decrypt (data, length);
}
void EncryptionAlgorithm::Decrypt (const BufferPtr &data) const
{
Decrypt (data, data.Size());
}
void EncryptionAlgorithm::DecryptSectors (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const
{
if_debug (ValidateState());
Mode->DecryptSectors (data, sectorIndex, sectorCount, sectorSize);
}
void EncryptionAlgorithm::Encrypt (byte *data, uint64 length) const
{
if_debug (ValidateState());
Mode->Encrypt (data, length);
}
void EncryptionAlgorithm::Encrypt (const BufferPtr &data) const
{
Encrypt (data, data.Size());
}
void EncryptionAlgorithm::EncryptSectors (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const
{
if_debug (ValidateState ());
Mode->EncryptSectors (data, sectorIndex, sectorCount, sectorSize);
}
EncryptionAlgorithmList EncryptionAlgorithm::GetAvailableAlgorithms ()
{
EncryptionAlgorithmList l;
l.push_back (shared_ptr (new GOST()));
return l;
}
size_t EncryptionAlgorithm::GetLargestKeySize (const EncryptionAlgorithmList &algorithms)
{
size_t largestKeySize = 0;
foreach_ref (const EncryptionAlgorithm &ea, algorithms)
{
if (ea.GetKeySize() > largestKeySize)
largestKeySize = ea.GetKeySize();
}
return largestKeySize;
}
size_t EncryptionAlgorithm::GetKeySize () const
{
if (Ciphers.size() < 1)
throw NotInitialized (SRC_POS);
size_t keySize = 0;
foreach_ref (const Cipher &c, Ciphers)
keySize += c.GetKeySize();
return keySize;
}
size_t EncryptionAlgorithm::GetMaxBlockSize () const
{
size_t blockSize = 0;
foreach_ref (const Cipher &c, Ciphers)
if (c.GetBlockSize() > blockSize)
blockSize = c.GetBlockSize();
return blockSize;
}
size_t EncryptionAlgorithm::GetMinBlockSize () const
{
size_t blockSize = 0;
foreach_ref (const Cipher &c, Ciphers)
if (blockSize == 0 || c.GetBlockSize() < blockSize)
blockSize = c.GetBlockSize();
return blockSize;
}
shared_ptr EncryptionAlgorithm::GetMode () const
{
if (Mode.get() == nullptr)
throw NotInitialized (SRC_POS);
return Mode;
}
wstring EncryptionAlgorithm::GetName () const
{
if (Ciphers.size() < 1)
throw NotInitialized (SRC_POS);
wstring name;
foreach_reverse_ref (const Cipher &c, Ciphers)
{
if (name.empty())
name = c.GetName();
else
name += wstring (L"-") + c.GetName();
}
return name;
}
bool EncryptionAlgorithm::IsModeSupported (const EncryptionMode &mode) const
{
bool supported = false;
foreach_ref (const EncryptionMode &em, SupportedModes)
{
if (typeid (mode) == typeid (em))
{
supported = true;
break;
}
}
return supported;
}
bool EncryptionAlgorithm::IsModeSupported (const shared_ptr mode) const
{
return IsModeSupported (*mode);
}
void EncryptionAlgorithm::SetMode (shared_ptr mode)
{
if (!IsModeSupported (*mode))
throw ParameterIncorrect (SRC_POS);
mode->SetCiphers (Ciphers);
Mode = mode;
}
void EncryptionAlgorithm::SetKey (const ConstBufferPtr &key)
{
if (Ciphers.size() < 1)
throw NotInitialized (SRC_POS);
if (GetKeySize() != key.Size())
throw ParameterIncorrect (SRC_POS);
size_t keyOffset = 0;
foreach_ref (Cipher &c, Ciphers)
{
c.SetKey (key.GetRange (keyOffset, c.GetKeySize()));
keyOffset += c.GetKeySize();
}
}
void EncryptionAlgorithm::ValidateState () const
{
if (Ciphers.size() < 1 || Mode.get() == nullptr)
throw NotInitialized (SRC_POS);
}
// GOST
GOST::GOST ()
{
Ciphers.push_back (shared_ptr (new CipherGOST ()));
SupportedModes.push_back (shared_ptr (new EncryptionModeXTS ()));
}
}
GostCrypt_MacOSX_1.0/Volume/._EncryptionAlgorithm.h 000755 000765 000024 00000000261 12361324353 022340 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/EncryptionAlgorithm.h 000755 000765 000024 00000005257 12361324353 022135 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Encryption_EncryptionAlgorithm
#define GST_HEADER_Encryption_EncryptionAlgorithm
#include "Platform/Platform.h"
#include "Cipher.h"
#include "EncryptionMode.h"
namespace GostCrypt
{
class EncryptionAlgorithm;
typedef list < shared_ptr > EncryptionAlgorithmList;
class EncryptionAlgorithm
{
public:
virtual ~EncryptionAlgorithm ();
virtual void Decrypt (byte *data, uint64 length) const;
virtual void Decrypt (const BufferPtr &data) const;
virtual void DecryptSectors (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const;
virtual void Encrypt (byte *data, uint64 length) const;
virtual void Encrypt (const BufferPtr &data) const;
virtual void EncryptSectors (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const;
static EncryptionAlgorithmList GetAvailableAlgorithms ();
virtual const CipherList &GetCiphers () const { return Ciphers; }
virtual shared_ptr GetNew () const = 0;
virtual size_t GetMaxBlockSize () const;
virtual size_t GetMinBlockSize () const;
static size_t GetLargestKeySize (const EncryptionAlgorithmList &algorithms);
virtual size_t GetKeySize () const;
virtual shared_ptr GetMode () const;
virtual wstring GetName () const;
bool IsDeprecated () const { return Deprecated; }
virtual bool IsModeSupported (const EncryptionMode &mode) const;
virtual bool IsModeSupported (const shared_ptr mode) const;
virtual void SetKey (const ConstBufferPtr &key);
virtual void SetMode (shared_ptr mode);
protected:
EncryptionAlgorithm ();
void ValidateState () const;
CipherList Ciphers;
bool Deprecated;
shared_ptr Mode;
EncryptionModeList SupportedModes;
private:
EncryptionAlgorithm (const EncryptionAlgorithm &);
EncryptionAlgorithm &operator= (const EncryptionAlgorithm &);
};
#define GST_ENCRYPTION_ALGORITHM(NAME) \
class NAME : public EncryptionAlgorithm \
{ \
public: \
NAME (); \
virtual ~NAME () { } \
\
virtual shared_ptr GetNew () const { return shared_ptr (new NAME()); } \
\
private: \
NAME (const NAME &); \
NAME &operator= (const NAME &); \
}
GST_ENCRYPTION_ALGORITHM (GOST);
#undef GST_ENCRYPTION_ALGORITHM
}
#endif // GST_HEADER_Encryption_EncryptionAlgorithm
GostCrypt_MacOSX_1.0/Volume/._EncryptionMode.cpp 000755 000765 000024 00000000261 12361324353 021631 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/EncryptionMode.cpp 000755 000765 000024 00000003722 12361324353 021421 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "EncryptionMode.h"
#include "EncryptionModeCBC.h"
#include "EncryptionModeLRW.h"
#include "EncryptionModeXTS.h"
#include "EncryptionThreadPool.h"
namespace GostCrypt
{
EncryptionMode::EncryptionMode () : KeySet (false), SectorOffset (0)
{
}
EncryptionMode::~EncryptionMode ()
{
}
void EncryptionMode::DecryptSectors (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const
{
EncryptionThreadPool::DoWork (EncryptionThreadPool::WorkType::DecryptDataUnits, this, data, sectorIndex, sectorCount, sectorSize);
}
void EncryptionMode::EncryptSectors (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const
{
EncryptionThreadPool::DoWork (EncryptionThreadPool::WorkType::EncryptDataUnits, this, data, sectorIndex, sectorCount, sectorSize);
}
EncryptionModeList EncryptionMode::GetAvailableModes ()
{
EncryptionModeList l;
l.push_back (shared_ptr (new EncryptionModeXTS ()));
l.push_back (shared_ptr (new EncryptionModeLRW ()));
l.push_back (shared_ptr (new EncryptionModeCBC ()));
return l;
}
void EncryptionMode::ValidateState () const
{
if (!KeySet || Ciphers.size() < 1)
throw NotInitialized (SRC_POS);
}
void EncryptionMode::ValidateParameters (byte *data, uint64 length) const
{
if ((Ciphers.size() > 0 && (length % Ciphers.front()->GetBlockSize()) != 0))
throw ParameterIncorrect (SRC_POS);
}
void EncryptionMode::ValidateParameters (byte *data, uint64 sectorCount, size_t sectorSize) const
{
if (sectorCount == 0 || sectorSize == 0 || (sectorSize % EncryptionDataUnitSize) != 0)
throw ParameterIncorrect (SRC_POS);
}
}
GostCrypt_MacOSX_1.0/Volume/._EncryptionMode.h 000755 000765 000024 00000000261 12361324353 021276 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/EncryptionMode.h 000755 000765 000024 00000004513 12361324353 021065 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Encryption_EncryptionMode
#define GST_HEADER_Encryption_EncryptionMode
#include "Platform/Platform.h"
#include "Common/Crypto.h"
#include "Cipher.h"
namespace GostCrypt
{
class EncryptionMode;
typedef list < shared_ptr > EncryptionModeList;
class EncryptionMode
{
public:
virtual ~EncryptionMode ();
virtual void Decrypt (byte *data, uint64 length) const = 0;
virtual void DecryptSectors (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const;
virtual void DecryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const = 0;
virtual void Encrypt (byte *data, uint64 length) const = 0;
virtual void EncryptSectors (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const;
virtual void EncryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const = 0;
static EncryptionModeList GetAvailableModes ();
virtual const SecureBuffer &GetKey () const { throw NotApplicable (SRC_POS); }
virtual size_t GetKeySize () const = 0;
virtual wstring GetName () const = 0;
virtual shared_ptr GetNew () const = 0;
virtual uint64 GetSectorOffset () const { return SectorOffset; }
virtual bool IsKeySet () const { return KeySet; }
virtual void SetKey (const ConstBufferPtr &key) = 0;
virtual void SetCiphers (const CipherList &ciphers) { Ciphers = ciphers; }
virtual void SetSectorOffset (int64 offset) { SectorOffset = offset; }
protected:
EncryptionMode ();
virtual void ValidateState () const;
void ValidateParameters (byte *data, uint64 length) const;
virtual void ValidateParameters (byte *data, uint64 sectorCount, size_t sectorSize) const;
static const size_t EncryptionDataUnitSize = ENCRYPTION_DATA_UNIT_SIZE;
CipherList Ciphers;
bool KeySet;
uint64 SectorOffset;
private:
EncryptionMode (const EncryptionMode &);
EncryptionMode &operator= (const EncryptionMode &);
};
}
#endif // GST_HEADER_Encryption_EncryptionMode
GostCrypt_MacOSX_1.0/Volume/._EncryptionModeCBC.cpp 000755 000765 000024 00000000261 12361324353 022141 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/EncryptionModeCBC.cpp 000755 000765 000024 00000020726 12361324353 021734 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "Platform/Memory.h"
#include "Common/Crc.h"
#include "Common/Endian.h"
#include "EncryptionModeCBC.h"
namespace GostCrypt
{
void EncryptionModeCBC::Decrypt (byte *data, uint64 length) const
{
if_debug (ValidateState ());
if_debug (ValidateParameters (data, length));
if (IsOuterCBC (Ciphers))
{
DecryptBuffer (data, length, Ciphers, (uint32 *) IV.Ptr(), (uint32 *) (IV.Ptr() + WhiteningIVOffset));
}
else
{
for (CipherList::const_reverse_iterator iCipherList = Ciphers.rbegin();
iCipherList != Ciphers.rend();
++iCipherList)
{
CipherList cl;
cl.push_back (*iCipherList);
DecryptBuffer (data, length, cl, (uint32 *) IV.Ptr(), (uint32 *) (IV.Ptr() + WhiteningIVOffset));
}
}
}
void EncryptionModeCBC::DecryptBuffer (byte *data, uint64 length, const CipherList &ciphers, const uint32 *iv, const uint32 *whitening) const
{
size_t blockSize = ciphers.front()->GetBlockSize();
if (blockSize != 8 && blockSize != 16)
throw ParameterIncorrect (SRC_POS);
uint32 *data32 = (uint32 *) data;
uint32 bufIV[4];
uint32 ct[4];
uint64 i;
bufIV[0] = iv[0];
bufIV[1] = iv[1];
if (blockSize == 16)
{
bufIV[2] = iv[2];
bufIV[3] = iv[3];
}
for (i = 0; i < length / blockSize; i++)
{
// Dewhitening
data32[0] ^= whitening[0];
data32[1] ^= whitening[1];
if (blockSize == 16)
{
data32[2] ^= whitening[0];
data32[3] ^= whitening[1];
}
// CBC
ct[0] = data32[0];
ct[1] = data32[1];
if (blockSize == 16)
{
ct[2] = data32[2];
ct[3] = data32[3];
}
for (CipherList::const_reverse_iterator iCipherList = ciphers.rbegin();
iCipherList != ciphers.rend();
++iCipherList)
{
const Cipher &c = **iCipherList;
if (c.GetBlockSize () != blockSize)
throw ParameterIncorrect (SRC_POS);
c.DecryptBlock ((byte *) data32);
}
// CBC
data32[0] ^= bufIV[0];
data32[1] ^= bufIV[1];
bufIV[0] = ct[0];
bufIV[1] = ct[1];
if (blockSize == 16)
{
data32[2] ^= bufIV[2];
data32[3] ^= bufIV[3];
bufIV[2] = ct[2];
bufIV[3] = ct[3];
}
data32 += blockSize / sizeof(*data32);
}
Memory::Erase (bufIV, sizeof (bufIV));
Memory::Erase (ct, sizeof (ct));
}
void EncryptionModeCBC::DecryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const
{
if_debug (ValidateState ());
if_debug (ValidateParameters (data, sectorCount, sectorSize));
uint32 sectorIV[4];
uint32 sectorWhitening[2];
while (sectorCount--)
{
if (IsOuterCBC (Ciphers))
{
InitSectorIVAndWhitening (sectorIndex, Ciphers.front()->GetBlockSize(), (uint64 *) IV.Ptr(), sectorIV, sectorWhitening);
DecryptBuffer (data, sectorSize, Ciphers, sectorIV, sectorWhitening);
}
else
{
for (CipherList::const_reverse_iterator iCipherList = Ciphers.rbegin();
iCipherList != Ciphers.rend();
++iCipherList)
{
const Cipher &c = **iCipherList;
CipherList cl;
cl.push_back (*iCipherList);
InitSectorIVAndWhitening (sectorIndex, c.GetBlockSize(), (uint64 *) IV.Ptr(), sectorIV, sectorWhitening);
DecryptBuffer (data, sectorSize, cl, sectorIV, sectorWhitening);
}
}
data += sectorSize;
sectorIndex++;
}
Memory::Erase (sectorIV, sizeof (sectorIV));
Memory::Erase (sectorWhitening, sizeof (sectorWhitening));
}
void EncryptionModeCBC::Encrypt (byte *data, uint64 length) const
{
if_debug (ValidateState ());
if_debug (ValidateParameters (data, length));
if (IsOuterCBC (Ciphers))
{
EncryptBuffer (data, length, Ciphers, (uint32 *) IV.Ptr(), (uint32 *) (IV.Ptr() + WhiteningIVOffset));
}
else
{
for (CipherList::const_iterator iCipherList = Ciphers.begin();
iCipherList != Ciphers.end();
++iCipherList)
{
CipherList cl;
cl.push_back (*iCipherList);
EncryptBuffer (data, length, cl, (uint32 *) IV.Ptr(), (uint32 *) (IV.Ptr() + WhiteningIVOffset));
}
}
}
void EncryptionModeCBC::EncryptBuffer (byte *data, uint64 length, const CipherList &ciphers, const uint32 *iv, const uint32 *whitening) const
{
size_t blockSize = ciphers.front()->GetBlockSize();
if (blockSize != 8 && blockSize != 16)
throw ParameterIncorrect (SRC_POS);
uint32 *data32 = (uint32 *) data;
uint32 bufIV[4];
uint64 i;
bufIV[0] = iv[0];
bufIV[1] = iv[1];
if (blockSize == 16)
{
bufIV[2] = iv[2];
bufIV[3] = iv[3];
}
for (i = 0; i < length / blockSize; i++)
{
data32[0] ^= bufIV[0];
data32[1] ^= bufIV[1];
if (blockSize == 16)
{
data32[2] ^= bufIV[2];
data32[3] ^= bufIV[3];
}
for (CipherList::const_iterator iCipherList = ciphers.begin();
iCipherList != ciphers.end();
++iCipherList)
{
const Cipher &c = **iCipherList;
if (c.GetBlockSize () != blockSize)
throw ParameterIncorrect (SRC_POS);
c.EncryptBlock ((byte *) data32);
}
bufIV[0] = data32[0];
bufIV[1] = data32[1];
if (blockSize == 16)
{
bufIV[2] = data32[2];
bufIV[3] = data32[3];
}
data32[0] ^= whitening[0];
data32[1] ^= whitening[1];
if (blockSize == 16)
{
data32[2] ^= whitening[0];
data32[3] ^= whitening[1];
}
data32 += blockSize / sizeof(*data32);
}
Memory::Erase (bufIV, sizeof (bufIV));
}
void EncryptionModeCBC::EncryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const
{
if_debug (ValidateState ());
if_debug (ValidateParameters (data, sectorCount, sectorSize));
uint32 sectorIV[4];
uint32 sectorWhitening[2];
while (sectorCount--)
{
if (IsOuterCBC (Ciphers))
{
InitSectorIVAndWhitening (sectorIndex, Ciphers.front()->GetBlockSize(), (uint64 *) IV.Ptr(), sectorIV, sectorWhitening);
EncryptBuffer (data, sectorSize, Ciphers, sectorIV, sectorWhitening);
}
else
{
for (CipherList::const_iterator iCipherList = Ciphers.begin();
iCipherList != Ciphers.end();
++iCipherList)
{
const Cipher &c = **iCipherList;
CipherList cl;
cl.push_back (*iCipherList);
InitSectorIVAndWhitening (sectorIndex, c.GetBlockSize(), (uint64 *) IV.Ptr(), sectorIV, sectorWhitening);
EncryptBuffer (data, sectorSize, cl, sectorIV, sectorWhitening);
}
}
data += sectorSize;
sectorIndex++;
}
Memory::Erase (sectorIV, sizeof (sectorIV));
Memory::Erase (sectorWhitening, sizeof (sectorWhitening));
}
void EncryptionModeCBC::InitSectorIVAndWhitening (uint64 sectorIndex, size_t blockSize, const uint64 *ivSeed, uint32 *iv, uint32 *whitening) const
{
if (blockSize != 8 && blockSize != 16)
throw ParameterIncorrect (SRC_POS);
uint64 iv64[4];
uint32 *iv32 = (uint32 *) iv64;
iv64[0] = ivSeed[0] ^ Endian::Little (sectorIndex);
iv64[1] = ivSeed[1] ^ Endian::Little (sectorIndex);
iv64[2] = ivSeed[2] ^ Endian::Little (sectorIndex);
if (blockSize == 16)
{
iv64[3] = ivSeed[3] ^ Endian::Little (sectorIndex);
}
iv[0] = iv32[0];
iv[1] = iv32[1];
if (blockSize == 8)
{
whitening[0] = Endian::Little ( crc32int ( &iv32[2] ) ^ crc32int ( &iv32[5] ) );
whitening[1] = Endian::Little ( crc32int ( &iv32[3] ) ^ crc32int ( &iv32[4] ) );
}
else
{
iv[2] = iv32[2];
iv[3] = iv32[3];
whitening[0] = Endian::Little ( crc32int ( &iv32[4] ) ^ crc32int ( &iv32[7] ) );
whitening[1] = Endian::Little ( crc32int ( &iv32[5] ) ^ crc32int ( &iv32[6] ) );
}
}
bool EncryptionModeCBC::IsOuterCBC (const CipherList &ciphers) const
{
if (ciphers.size() < 2)
return false;
size_t blockSize = ciphers.front()->GetBlockSize();
for (CipherList::const_iterator iCipherList = ciphers.begin();
iCipherList != ciphers.end();
++iCipherList)
{
const Cipher &c = **iCipherList;
if (c.GetBlockSize() != blockSize)
return false;
}
return true;
}
void EncryptionModeCBC::SetKey (const ConstBufferPtr &key)
{
if (key.Size() != GetKeySize ())
throw ParameterIncorrect (SRC_POS);
if (!KeySet)
IV.Allocate (GetKeySize ());
IV.CopyFrom (key);
KeySet = true;
}
}
GostCrypt_MacOSX_1.0/Volume/._EncryptionModeCBC.h 000755 000765 000024 00000000261 12361324353 021606 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/EncryptionModeCBC.h 000755 000765 000024 00000003612 12361324353 021374 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Encryption_EncryptionModeCBC
#define GST_HEADER_Encryption_EncryptionModeCBC
#include "Platform/Platform.h"
#include "EncryptionMode.h"
namespace GostCrypt
{
class EncryptionModeCBC : public EncryptionMode
{
public:
EncryptionModeCBC () { }
virtual ~EncryptionModeCBC () { }
virtual void Decrypt (byte *data, uint64 length) const;
virtual void DecryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const;
virtual void Encrypt (byte *data, uint64 length) const;
virtual void EncryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const;
virtual size_t GetKeySize () const { return 32; };
virtual wstring GetName () const { return L"CBC"; };
virtual shared_ptr GetNew () const { return shared_ptr (new EncryptionModeCBC); }
virtual void SetKey (const ConstBufferPtr &key);
protected:
void DecryptBuffer (byte *data, uint64 length, const CipherList &ciphers, const uint32 *iv, const uint32 *whitening) const;
void EncryptBuffer (byte *data, uint64 length, const CipherList &ciphers, const uint32 *iv, const uint32 *whitening) const;
void InitSectorIVAndWhitening (uint64 sectorIndex, size_t blockSize, const uint64 *ivSeed, uint32 *iv, uint32 *whitening) const;
bool IsOuterCBC (const CipherList &ciphers) const;
SecureBuffer IV;
static const int WhiteningIVOffset = 8;
private:
EncryptionModeCBC (const EncryptionModeCBC &);
EncryptionModeCBC &operator= (const EncryptionModeCBC &);
};
}
#endif // GST_HEADER_Encryption_EncryptionModeCBC
GostCrypt_MacOSX_1.0/Volume/._EncryptionModeLRW.cpp 000755 000765 000024 00000000261 12361324353 022216 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/EncryptionModeLRW.cpp 000755 000765 000024 00000011271 12361324353 022004 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "EncryptionModeLRW.h"
#include "Common/GfMul.h"
namespace GostCrypt
{
void EncryptionModeLRW::Decrypt (byte *data, uint64 length) const
{
if_debug (ValidateState ());
DecryptBuffer (data, length, 1);
}
void EncryptionModeLRW::DecryptBuffer (byte *data, uint64 length, uint64 blockIndex) const
{
size_t blockSize = Ciphers.front()->GetBlockSize();
if (blockSize != 8 && blockSize != 16)
throw ParameterIncorrect (SRC_POS);
byte i[8];
*(uint64 *)i = Endian::Big (blockIndex);
byte t[Cipher::MaxBlockSize];
for (unsigned int b = 0; b < length / blockSize; b++)
{
if (blockSize == 8)
{
Gf64MulTab (i, t, (GfCtx *) (GfContext.Ptr()));
Xor64 ((uint64 *)data, (uint64 *)t);
}
else
{
Gf128MulBy64Tab (i, t, (GfCtx *) (GfContext.Ptr()));
Xor128 ((uint64 *)data, (uint64 *)t);
}
for (CipherList::const_reverse_iterator iCipherList = Ciphers.rbegin();
iCipherList != Ciphers.rend();
++iCipherList)
{
const Cipher &c = **iCipherList;
if (c.GetBlockSize () != blockSize)
throw ParameterIncorrect (SRC_POS);
c.DecryptBlock (data);
}
if (blockSize == 8)
Xor64 ((uint64 *)data, (uint64 *)t);
else
Xor128 ((uint64 *)data, (uint64 *)t);
data += blockSize;
IncrementBlockIndex (i);
}
Memory::Erase (t, sizeof (t));
}
void EncryptionModeLRW::DecryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const
{
if_debug (ValidateState ());
if_debug (ValidateParameters (data, sectorCount, sectorSize));
DecryptBuffer (data,
sectorCount * sectorSize,
SectorToBlockIndex (sectorIndex));
}
void EncryptionModeLRW::Encrypt (byte *data, uint64 length) const
{
ValidateState ();
EncryptBuffer (data, length, 1);
}
void EncryptionModeLRW::EncryptBuffer (byte *data, uint64 length, uint64 blockIndex) const
{
size_t blockSize = Ciphers.front()->GetBlockSize();
if (blockSize != 8 && blockSize != 16)
throw ParameterIncorrect (SRC_POS);
byte i[8];
*(uint64 *)i = Endian::Big (blockIndex);
byte t[Cipher::MaxBlockSize];
for (unsigned int b = 0; b < length / blockSize; b++)
{
if (blockSize == 8)
{
Gf64MulTab (i, t, (GfCtx *) (GfContext.Ptr()));
Xor64 ((uint64 *)data, (uint64 *)t);
}
else
{
Gf128MulBy64Tab (i, t, (GfCtx *) (GfContext.Ptr()));
Xor128 ((uint64 *)data, (uint64 *)t);
}
for (CipherList::const_iterator iCipherList = Ciphers.begin();
iCipherList != Ciphers.end();
++iCipherList)
{
const Cipher &c = **iCipherList;
if (c.GetBlockSize () != blockSize)
throw ParameterIncorrect (SRC_POS);
c.EncryptBlock (data);
}
if (blockSize == 8)
Xor64 ((uint64 *)data, (uint64 *)t);
else
Xor128 ((uint64 *)data, (uint64 *)t);
data += blockSize;
IncrementBlockIndex (i);
}
Memory::Erase (t, sizeof (t));
}
void EncryptionModeLRW::EncryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const
{
if_debug (ValidateState ());
if_debug (ValidateParameters (data, sectorCount, sectorSize));
EncryptBuffer (data,
sectorCount * sectorSize,
SectorToBlockIndex (sectorIndex));
}
void EncryptionModeLRW::IncrementBlockIndex (byte *index) const
{
if (index[7] != 0xff)
index[7]++;
else
*(uint64 *)index = Endian::Big ( Endian::Big (*(uint64 *)index) + 1 );
}
uint64 EncryptionModeLRW::SectorToBlockIndex (uint64 sectorIndex) const
{
sectorIndex -= SectorOffset;
switch (Ciphers.front()->GetBlockSize())
{
case 8:
return (sectorIndex << 6) | 1;
case 16:
return (sectorIndex << 5) | 1;
default:
throw ParameterIncorrect (SRC_POS);
}
}
void EncryptionModeLRW::SetKey (const ConstBufferPtr &key)
{
if (key.Size() != 16)
throw ParameterIncorrect (SRC_POS);
if (!KeySet)
GfContext.Allocate (sizeof (GfCtx));
if (!Gf64TabInit ((unsigned char *) key.Get(), (GfCtx *) (GfContext.Ptr())))
throw bad_alloc();
if (!Gf128Tab64Init ((unsigned char *) key.Get(), (GfCtx *) (GfContext.Ptr())))
throw bad_alloc();
Key.CopyFrom (key);
KeySet = true;
}
void EncryptionModeLRW::Xor64 (uint64 *a, const uint64 *b) const
{
*a ^= *b;
}
void EncryptionModeLRW::Xor128 (uint64 *a, const uint64 *b) const
{
*a++ ^= *b++;
*a ^= *b;
}
}
GostCrypt_MacOSX_1.0/Volume/._EncryptionModeLRW.h 000755 000765 000024 00000000261 12361324353 021663 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/EncryptionModeLRW.h 000755 000765 000024 00000003563 12361324353 021456 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Encryption_EncryptionModeLRW
#define GST_HEADER_Encryption_EncryptionModeLRW
#include "Platform/Platform.h"
#include "EncryptionMode.h"
namespace GostCrypt
{
class EncryptionModeLRW : public EncryptionMode
{
public:
EncryptionModeLRW () { }
virtual ~EncryptionModeLRW () { }
virtual void Decrypt (byte *data, uint64 length) const;
virtual void DecryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const;
virtual void Encrypt (byte *data, uint64 length) const;
virtual void EncryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const;
virtual const SecureBuffer &GetKey () const { return Key; }
virtual size_t GetKeySize () const { return 16; };
virtual wstring GetName () const { return L"LRW"; };
virtual shared_ptr GetNew () const { return shared_ptr (new EncryptionModeLRW); }
virtual void SetKey (const ConstBufferPtr &key);
protected:
void DecryptBuffer (byte *plainText, uint64 length, uint64 blockIndex) const;
void EncryptBuffer (byte *plainText, uint64 length, uint64 blockIndex) const;
void IncrementBlockIndex (byte *index) const;
uint64 SectorToBlockIndex (uint64 sectorIndex) const;
void Xor64 (uint64 *a, const uint64 *b) const;
void Xor128 (uint64 *a, const uint64 *b) const;
SecureBuffer GfContext;
SecureBuffer Key;
private:
EncryptionModeLRW (const EncryptionModeLRW &);
EncryptionModeLRW &operator= (const EncryptionModeLRW &);
};
}
#endif // GST_HEADER_Encryption_EncryptionModeLRW
GostCrypt_MacOSX_1.0/Volume/._EncryptionModeXTS.cpp 000755 000765 000024 00000000261 12361324353 022230 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/EncryptionModeXTS.cpp 000755 000765 000024 00000043222 12361324353 022017 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008-2010 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "EncryptionModeXTS.h"
#include "Common/Crypto.h"
namespace GostCrypt
{
void EncryptionModeXTS::Encrypt (byte *data, uint64 length) const
{
EncryptBuffer (data, length, 0);
}
void EncryptionModeXTS::EncryptBuffer (byte *data, uint64 length, uint64 startDataUnitNo) const
{
if_debug (ValidateState());
CipherList::const_iterator iSecondaryCipher = SecondaryCiphers.begin();
for (CipherList::const_iterator iCipher = Ciphers.begin(); iCipher != Ciphers.end(); ++iCipher)
{
if ((**iCipher).GetBlockSize() == 8)
EncryptBufferXTS8Byte (**iCipher, **iSecondaryCipher, data, length, startDataUnitNo, 0);
else
EncryptBufferXTS (**iCipher, **iSecondaryCipher, data, length, startDataUnitNo, 0);
++iSecondaryCipher;
}
assert (iSecondaryCipher == SecondaryCiphers.end());
}
void EncryptionModeXTS::EncryptBufferXTS8Byte (const Cipher &cipher, const Cipher &secondaryCipher, byte *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const
{
byte finalCarry;
byte whiteningValue [BYTES_PER_XTS_BLOCK_SMALL];
byte byteBufUnitNo [BYTES_PER_XTS_BLOCK_SMALL];
byte xor_ks [MAX_EXPANDED_KEY];
uint32 *whiteningValuePtr32 = (uint32 *)whiteningValue;
uint32 *bufPtr = (uint32 *)buffer;
uint32 startBlock = startCipherBlockNo, endBlock, block;
uint64 blockCount, dataUnitNo;
dataUnitNo = startDataUnitNo;
*((uint64 *) byteBufUnitNo) = Endian::Little (dataUnitNo);
if (length % BYTES_PER_XTS_BLOCK_SMALL)
GST_THROW_FATAL_EXCEPTION;
blockCount = length / BYTES_PER_XTS_BLOCK_SMALL;
//Store the original key schedule
cipher.CopyCipherKey ((byte *)xor_ks);
while (blockCount > 0)
{
if (blockCount < BLOCKS_PER_XTS_DATA_UNIT_SMALL)
endBlock = startBlock + (uint32) blockCount;
else
endBlock = BLOCKS_PER_XTS_DATA_UNIT_SMALL;
whiteningValuePtr32 = (uint32 *) whiteningValue;
//Generate first whitening value
*whiteningValuePtr32 = *((uint32 *) byteBufUnitNo);
*(whiteningValuePtr32+1) = *((uint32 *) byteBufUnitNo+1);
secondaryCipher.EncryptBlock (whiteningValue);
//XOR ks with the current DataUnitNo
cipher.XorCipherKey ((byte *)xor_ks, byteBufUnitNo, 8);
//Generate subsequent whitening values for blocks
for (block = 0; block < endBlock; block++)
{
if (block >= startBlock)
{
//Pre-whitening
*bufPtr++ ^= *whiteningValuePtr32++;
*bufPtr-- ^= *whiteningValuePtr32--;
//Actual encryption
cipher.EncryptWithKS((byte *) bufPtr, (byte *) xor_ks);
//Post-whitening
*bufPtr++ ^= *whiteningValuePtr32++;
*bufPtr++ ^= *whiteningValuePtr32;
}
else
whiteningValuePtr32++;
//Derive the next whitening value
#if BYTE_ORDER == LITTLE_ENDIAN
//Little-endian platforms
finalCarry = (*whiteningValuePtr32 & 0x80000000) ? 135 : 0;
*whiteningValuePtr32-- <<= 1;
if (*whiteningValuePtr32 & 0x80000000)
*(whiteningValuePtr32 + 1) |= 1;
*whiteningValuePtr32 <<= 1;
#else
//Big-endian platforms
finalCarry = (*whiteningValuePtr32 & 0x80) ? 135 : 0;
*whiteningValuePtr32 = Endian::Little (Endian::Little (*whiteningValuePtr32) << 1);
whiteningValuePtr32--;
if (*whiteningValuePtr32 & 0x80)
*(whiteningValuePtr32 + 1) |= 0x01000000;
*whiteningValuePtr32 = Endian::Little (Endian::Little (*whiteningValuePtr32) << 1);
#endif
whiteningValue[0] ^= finalCarry;
}
blockCount -= endBlock - startBlock;
startBlock = 0;
dataUnitNo++;
*((uint64 *) byteBufUnitNo) = Endian::Little (dataUnitNo);
}
FAST_ERASE64(whiteningValue, sizeof(whiteningValue));
}
void EncryptionModeXTS::EncryptBufferXTS (const Cipher &cipher, const Cipher &secondaryCipher, byte *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const
{
byte finalCarry;
byte whiteningValues [ENCRYPTION_DATA_UNIT_SIZE];
byte whiteningValue [BYTES_PER_XTS_BLOCK];
byte byteBufUnitNo [BYTES_PER_XTS_BLOCK];
uint64 *whiteningValuesPtr64 = (uint64 *) whiteningValues;
uint64 *whiteningValuePtr64 = (uint64 *) whiteningValue;
uint64 *bufPtr = (uint64 *) buffer;
uint64 *dataUnitBufPtr;
unsigned int startBlock = startCipherBlockNo, endBlock, block;
uint64 *const finalInt64WhiteningValuesPtr = whiteningValuesPtr64 + sizeof (whiteningValues) / sizeof (*whiteningValuesPtr64) - 1;
uint64 blockCount, dataUnitNo;
startDataUnitNo += SectorOffset;
/* The encrypted data unit number (i.e. the resultant ciphertext block) is to be multiplied in the
finite field GF(2^128) by j-th power of n, where j is the sequential plaintext/ciphertext block
number and n is 2, a primitive element of GF(2^128). This can be (and is) simplified and implemented
as a left shift of the preceding whitening value by one bit (with carry propagating). In addition, if
the shift of the highest byte results in a carry, 135 is XORed into the lowest byte. The value 135 is
derived from the modulus of the Galois Field (x^128+x^7+x^2+x+1). */
// Convert the 64-bit data unit number into a little-endian 16-byte array.
// Note that as we are converting a 64-bit number into a 16-byte array we can always zero the last 8 bytes.
dataUnitNo = startDataUnitNo;
*((uint64 *) byteBufUnitNo) = Endian::Little (dataUnitNo);
*((uint64 *) byteBufUnitNo + 1) = 0;
if (length % BYTES_PER_XTS_BLOCK)
GST_THROW_FATAL_EXCEPTION;
blockCount = length / BYTES_PER_XTS_BLOCK;
// Process all blocks in the buffer
while (blockCount > 0)
{
if (blockCount < BLOCKS_PER_XTS_DATA_UNIT)
endBlock = startBlock + (unsigned int) blockCount;
else
endBlock = BLOCKS_PER_XTS_DATA_UNIT;
whiteningValuesPtr64 = finalInt64WhiteningValuesPtr;
whiteningValuePtr64 = (uint64 *) whiteningValue;
// Encrypt the data unit number using the secondary key (in order to generate the first
// whitening value for this data unit)
*whiteningValuePtr64 = *((uint64 *) byteBufUnitNo);
*(whiteningValuePtr64 + 1) = 0;
secondaryCipher.EncryptBlock (whiteningValue);
// Generate subsequent whitening values for blocks in this data unit. Note that all generated 128-bit
// whitening values are stored in memory as a sequence of 64-bit integers in reverse order.
for (block = 0; block < endBlock; block++)
{
if (block >= startBlock)
{
*whiteningValuesPtr64-- = *whiteningValuePtr64++;
*whiteningValuesPtr64-- = *whiteningValuePtr64;
}
else
whiteningValuePtr64++;
// Derive the next whitening value
#if BYTE_ORDER == LITTLE_ENDIAN
// Little-endian platforms
finalCarry =
(*whiteningValuePtr64 & 0x8000000000000000ULL) ?
135 : 0;
*whiteningValuePtr64-- <<= 1;
if (*whiteningValuePtr64 & 0x8000000000000000ULL)
*(whiteningValuePtr64 + 1) |= 1;
*whiteningValuePtr64 <<= 1;
#else
// Big-endian platforms
finalCarry =
(*whiteningValuePtr64 & 0x80) ?
135 : 0;
*whiteningValuePtr64 = Endian::Little (Endian::Little (*whiteningValuePtr64) << 1);
whiteningValuePtr64--;
if (*whiteningValuePtr64 & 0x80)
*(whiteningValuePtr64 + 1) |= 0x0100000000000000ULL;
*whiteningValuePtr64 = Endian::Little (Endian::Little (*whiteningValuePtr64) << 1);
#endif
whiteningValue[0] ^= finalCarry;
}
dataUnitBufPtr = bufPtr;
whiteningValuesPtr64 = finalInt64WhiteningValuesPtr;
// Encrypt all blocks in this data unit
for (block = startBlock; block < endBlock; block++)
{
// Pre-whitening
*bufPtr++ ^= *whiteningValuesPtr64--;
*bufPtr++ ^= *whiteningValuesPtr64--;
}
// Actual encryption
cipher.EncryptBlocks ((byte *) dataUnitBufPtr, endBlock - startBlock);
bufPtr = dataUnitBufPtr;
whiteningValuesPtr64 = finalInt64WhiteningValuesPtr;
for (block = startBlock; block < endBlock; block++)
{
// Post-whitening
*bufPtr++ ^= *whiteningValuesPtr64--;
*bufPtr++ ^= *whiteningValuesPtr64--;
}
blockCount -= endBlock - startBlock;
startBlock = 0;
dataUnitNo++;
*((uint64 *) byteBufUnitNo) = Endian::Little (dataUnitNo);
}
FAST_ERASE64 (whiteningValue, sizeof (whiteningValue));
FAST_ERASE64 (whiteningValues, sizeof (whiteningValues));
}
void EncryptionModeXTS::EncryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const
{
EncryptBuffer (data, sectorCount * sectorSize, sectorIndex * sectorSize / ENCRYPTION_DATA_UNIT_SIZE);
}
size_t EncryptionModeXTS::GetKeySize () const
{
if (Ciphers.empty())
throw NotInitialized (SRC_POS);
size_t keySize = 0;
foreach_ref (const Cipher &cipher, SecondaryCiphers)
{
keySize += cipher.GetKeySize();
}
return keySize;
}
void EncryptionModeXTS::Decrypt (byte *data, uint64 length) const
{
DecryptBuffer (data, length, 0);
}
void EncryptionModeXTS::DecryptBuffer (byte *data, uint64 length, uint64 startDataUnitNo) const
{
if_debug (ValidateState());
CipherList::const_iterator iSecondaryCipher = SecondaryCiphers.end();
for (CipherList::const_reverse_iterator iCipher = Ciphers.rbegin(); iCipher != Ciphers.rend(); ++iCipher)
{
--iSecondaryCipher;
if ((**iCipher).GetBlockSize() == 8)
DecryptBufferXTS8Byte (**iCipher, **iSecondaryCipher, data, length, startDataUnitNo, 0);
else
DecryptBufferXTS (**iCipher, **iSecondaryCipher, data, length, startDataUnitNo, 0);
}
assert (iSecondaryCipher == SecondaryCiphers.begin());
}
void EncryptionModeXTS::DecryptBufferXTS8Byte (const Cipher &cipher, const Cipher &secondaryCipher, byte *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const
{
byte finalCarry;
byte whiteningValue [BYTES_PER_XTS_BLOCK_SMALL];
byte byteBufUnitNo [BYTES_PER_XTS_BLOCK_SMALL];
byte xor_ks [MAX_EXPANDED_KEY];
uint32 *whiteningValuePtr32 = (uint32 *)whiteningValue;
uint32 *bufPtr = (uint32 *)buffer;
uint32 startBlock = startCipherBlockNo, endBlock, block;
uint64 blockCount, dataUnitNo;
dataUnitNo = startDataUnitNo;
*((uint64 *) byteBufUnitNo) = Endian::Little (dataUnitNo);
if (length % BYTES_PER_XTS_BLOCK_SMALL)
GST_THROW_FATAL_EXCEPTION;
blockCount = length / BYTES_PER_XTS_BLOCK_SMALL;
//Store the original key schedule
cipher.CopyCipherKey ((byte *)xor_ks);
while (blockCount > 0)
{
if (blockCount < BLOCKS_PER_XTS_DATA_UNIT_SMALL)
endBlock = startBlock + (uint32) blockCount;
else
endBlock = BLOCKS_PER_XTS_DATA_UNIT_SMALL;
whiteningValuePtr32 = (uint32 *) whiteningValue;
//Generate first whitening value
*whiteningValuePtr32 = *((uint32 *) byteBufUnitNo);
*(whiteningValuePtr32+1) = *((uint32 *) byteBufUnitNo+1);
secondaryCipher.EncryptBlock (whiteningValue);
//XOR ks with the current DataUnitNo
cipher.XorCipherKey ((byte *)xor_ks, byteBufUnitNo, 8);
//Generate subsequent whitening values for blocks
for (block = 0; block < endBlock; block++)
{
if (block >= startBlock)
{
//Pre-whitening
*bufPtr++ ^= *whiteningValuePtr32++;
*bufPtr-- ^= *whiteningValuePtr32--;
//Actual encryption
cipher.DecryptWithKS((byte *) bufPtr, (byte *) xor_ks);
//Post-whitening
*bufPtr++ ^= *whiteningValuePtr32++;
*bufPtr++ ^= *whiteningValuePtr32;
}
else
whiteningValuePtr32++;
//Derive the next whitening value
#if BYTE_ORDER == LITTLE_ENDIAN
//Little-endian platforms
finalCarry = (*whiteningValuePtr32 & 0x80000000) ? 135 : 0;
*whiteningValuePtr32-- <<= 1;
if (*whiteningValuePtr32 & 0x80000000)
*(whiteningValuePtr32 + 1) |= 1;
*whiteningValuePtr32 <<= 1;
#else
//Big-endian platforms
finalCarry = (*whiteningValuePtr32 & 0x80) ? 135 : 0;
*whiteningValuePtr32 = Endian::Little (Endian::Little (*whiteningValuePtr32) << 1);
whiteningValuePtr32--;
if (*whiteningValuePtr32 & 0x80)
*(whiteningValuePtr32 + 1) |= 0x01000000;
*whiteningValuePtr32 = Endian::Little (Endian::Little (*whiteningValuePtr32) << 1);
#endif
whiteningValue[0] ^= finalCarry;
}
blockCount -= endBlock - startBlock;
startBlock = 0;
dataUnitNo++;
*((uint64 *) byteBufUnitNo) = Endian::Little (dataUnitNo);
}
FAST_ERASE64(whiteningValue, sizeof(whiteningValue));
}
void EncryptionModeXTS::DecryptBufferXTS (const Cipher &cipher, const Cipher &secondaryCipher, byte *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const
{
byte finalCarry;
byte whiteningValues [ENCRYPTION_DATA_UNIT_SIZE];
byte whiteningValue [BYTES_PER_XTS_BLOCK];
byte byteBufUnitNo [BYTES_PER_XTS_BLOCK];
uint64 *whiteningValuesPtr64 = (uint64 *) whiteningValues;
uint64 *whiteningValuePtr64 = (uint64 *) whiteningValue;
uint64 *bufPtr = (uint64 *) buffer;
uint64 *dataUnitBufPtr;
unsigned int startBlock = startCipherBlockNo, endBlock, block;
uint64 *const finalInt64WhiteningValuesPtr = whiteningValuesPtr64 + sizeof (whiteningValues) / sizeof (*whiteningValuesPtr64) - 1;
uint64 blockCount, dataUnitNo;
startDataUnitNo += SectorOffset;
// Convert the 64-bit data unit number into a little-endian 16-byte array.
// Note that as we are converting a 64-bit number into a 16-byte array we can always zero the last 8 bytes.
dataUnitNo = startDataUnitNo;
*((uint64 *) byteBufUnitNo) = Endian::Little (dataUnitNo);
*((uint64 *) byteBufUnitNo + 1) = 0;
if (length % BYTES_PER_XTS_BLOCK)
GST_THROW_FATAL_EXCEPTION;
blockCount = length / BYTES_PER_XTS_BLOCK;
// Process all blocks in the buffer
while (blockCount > 0)
{
if (blockCount < BLOCKS_PER_XTS_DATA_UNIT)
endBlock = startBlock + (unsigned int) blockCount;
else
endBlock = BLOCKS_PER_XTS_DATA_UNIT;
whiteningValuesPtr64 = finalInt64WhiteningValuesPtr;
whiteningValuePtr64 = (uint64 *) whiteningValue;
// Encrypt the data unit number using the secondary key (in order to generate the first
// whitening value for this data unit)
*whiteningValuePtr64 = *((uint64 *) byteBufUnitNo);
*(whiteningValuePtr64 + 1) = 0;
secondaryCipher.EncryptBlock (whiteningValue);
// Generate subsequent whitening values for blocks in this data unit. Note that all generated 128-bit
// whitening values are stored in memory as a sequence of 64-bit integers in reverse order.
for (block = 0; block < endBlock; block++)
{
if (block >= startBlock)
{
*whiteningValuesPtr64-- = *whiteningValuePtr64++;
*whiteningValuesPtr64-- = *whiteningValuePtr64;
}
else
whiteningValuePtr64++;
// Derive the next whitening value
#if BYTE_ORDER == LITTLE_ENDIAN
// Little-endian platforms
finalCarry =
(*whiteningValuePtr64 & 0x8000000000000000ULL) ?
135 : 0;
*whiteningValuePtr64-- <<= 1;
if (*whiteningValuePtr64 & 0x8000000000000000ULL)
*(whiteningValuePtr64 + 1) |= 1;
*whiteningValuePtr64 <<= 1;
#else
// Big-endian platforms
finalCarry =
(*whiteningValuePtr64 & 0x80) ?
135 : 0;
*whiteningValuePtr64 = Endian::Little (Endian::Little (*whiteningValuePtr64) << 1);
whiteningValuePtr64--;
if (*whiteningValuePtr64 & 0x80)
*(whiteningValuePtr64 + 1) |= 0x0100000000000000ULL;
*whiteningValuePtr64 = Endian::Little (Endian::Little (*whiteningValuePtr64) << 1);
#endif
whiteningValue[0] ^= finalCarry;
}
dataUnitBufPtr = bufPtr;
whiteningValuesPtr64 = finalInt64WhiteningValuesPtr;
// Decrypt blocks in this data unit
for (block = startBlock; block < endBlock; block++)
{
*bufPtr++ ^= *whiteningValuesPtr64--;
*bufPtr++ ^= *whiteningValuesPtr64--;
}
cipher.DecryptBlocks ((byte *) dataUnitBufPtr, endBlock - startBlock);
bufPtr = dataUnitBufPtr;
whiteningValuesPtr64 = finalInt64WhiteningValuesPtr;
for (block = startBlock; block < endBlock; block++)
{
*bufPtr++ ^= *whiteningValuesPtr64--;
*bufPtr++ ^= *whiteningValuesPtr64--;
}
blockCount -= endBlock - startBlock;
startBlock = 0;
dataUnitNo++;
*((uint64 *) byteBufUnitNo) = Endian::Little (dataUnitNo);
}
FAST_ERASE64 (whiteningValue, sizeof (whiteningValue));
FAST_ERASE64 (whiteningValues, sizeof (whiteningValues));
}
void EncryptionModeXTS::DecryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const
{
DecryptBuffer (data, sectorCount * sectorSize, sectorIndex * sectorSize / ENCRYPTION_DATA_UNIT_SIZE);
}
void EncryptionModeXTS::SetCiphers (const CipherList &ciphers)
{
EncryptionMode::SetCiphers (ciphers);
SecondaryCiphers.clear();
foreach_ref (const Cipher &cipher, ciphers)
{
SecondaryCiphers.push_back (cipher.GetNew());
}
if (SecondaryKey.Size() > 0)
SetSecondaryCipherKeys();
}
void EncryptionModeXTS::SetKey (const ConstBufferPtr &key)
{
SecondaryKey.Allocate (key.Size());
SecondaryKey.CopyFrom (key);
if (!SecondaryCiphers.empty())
SetSecondaryCipherKeys();
}
void EncryptionModeXTS::SetSecondaryCipherKeys ()
{
size_t keyOffset = 0;
foreach_ref (Cipher &cipher, SecondaryCiphers)
{
cipher.SetKey (SecondaryKey.GetRange (keyOffset, cipher.GetKeySize()));
keyOffset += cipher.GetKeySize();
}
KeySet = true;
}
}
GostCrypt_MacOSX_1.0/Volume/._EncryptionModeXTS.h 000755 000765 000024 00000000261 12361324353 021675 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/EncryptionModeXTS.h 000755 000765 000024 00000004665 12361324353 021474 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Volume_EncryptionModeXTS
#define GST_HEADER_Volume_EncryptionModeXTS
#include "Platform/Platform.h"
#include "EncryptionMode.h"
namespace GostCrypt
{
class EncryptionModeXTS : public EncryptionMode
{
public:
EncryptionModeXTS () { }
virtual ~EncryptionModeXTS () { }
virtual void Decrypt (byte *data, uint64 length) const;
virtual void DecryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const;
virtual void Encrypt (byte *data, uint64 length) const;
virtual void EncryptSectorsCurrentThread (byte *data, uint64 sectorIndex, uint64 sectorCount, size_t sectorSize) const;
virtual const SecureBuffer &GetKey () const { return SecondaryKey; }
virtual size_t GetKeySize () const;
virtual wstring GetName () const { return L"XTS"; };
virtual shared_ptr GetNew () const { return shared_ptr (new EncryptionModeXTS); }
virtual void SetCiphers (const CipherList &ciphers);
virtual void SetKey (const ConstBufferPtr &key);
protected:
void DecryptBuffer (byte *data, uint64 length, uint64 startDataUnitNo) const;
void DecryptBufferXTS (const Cipher &cipher, const Cipher &secondaryCipher, byte *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const;
void DecryptBufferXTS8Byte (const Cipher &cipher, const Cipher &secondaryCipher, byte *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const;
void EncryptBuffer (byte *data, uint64 length, uint64 startDataUnitNo) const;
void EncryptBufferXTS (const Cipher &cipher, const Cipher &secondaryCipher, byte *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const;
void EncryptBufferXTS8Byte (const Cipher &cipher, const Cipher &secondaryCipher, byte *buffer, uint64 length, uint64 startDataUnitNo, unsigned int startCipherBlockNo) const;
void SetSecondaryCipherKeys ();
SecureBuffer SecondaryKey;
CipherList SecondaryCiphers;
private:
EncryptionModeXTS (const EncryptionModeXTS &);
EncryptionModeXTS &operator= (const EncryptionModeXTS &);
};
}
#endif // GST_HEADER_Volume_EncryptionModeXTS
GostCrypt_MacOSX_1.0/Volume/._EncryptionTest.cpp 000755 000765 000024 00000000261 12361324353 021664 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/EncryptionTest.cpp 000755 000765 000024 00000124626 12361324353 021463 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008-2010 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "Cipher.h"
#include "Common/Crc.h"
#include "Crc32.h"
#include "EncryptionAlgorithm.h"
#include "EncryptionMode.h"
#include "EncryptionModeCBC.h"
#include "EncryptionModeLRW.h"
#include "EncryptionModeXTS.h"
#include "EncryptionTest.h"
#include "Pkcs5Kdf.h"
namespace GostCrypt
{
void EncryptionTest::TestAll ()
{
TestAll (false);
TestAll (true);
}
void EncryptionTest::TestAll (bool enableCpuEncryptionSupport)
{
TestCiphers();
TestXts();
TestPkcs5();
}
struct CipherTestVector
{
byte Key[32];
byte Plaintext[16];
byte Ciphertext[16];
};
struct CipherTestVector GOSTTestVectors[] =
{
{
.Key = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x01, 0x10, 0x23, 0x32, 0x45, 0x54, 0x67, 0x76, 0x89, 0x98, 0xAB, 0xBA, 0xCD, 0xDC, 0xEF, 0xFE},
.Plaintext = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
.Ciphertext = { 0xd8, 0xc6, 0x35, 0x7d, 0x83, 0xb7, 0x9f, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
}
};
static void TestCipher (Cipher &cipher, const CipherTestVector *testVector, size_t testVectorCount)
{
Buffer buffer (cipher.GetBlockSize());
for (size_t i = 0; i < testVectorCount; ++i)
{
cipher.SetKey (ConstBufferPtr (testVector[i].Key, sizeof (testVector[i].Key)));
buffer.CopyFrom (ConstBufferPtr (testVector[i].Plaintext, buffer.Size()));
cipher.EncryptBlock (buffer);
if (memcmp (buffer, testVector[i].Ciphertext, buffer.Size()) != 0)
throw TestFailed (SRC_POS);
}
}
void EncryptionTest::TestCiphers ()
{
CipherGOST gost;
TestCipher (gost, GOSTTestVectors, array_capacity (GOSTTestVectors));
Buffer testData (1024);
for (size_t i = 0; i < testData.Size(); ++i)
{
testData[i] = (byte) i;
}
uint32 origCrc = Crc32::ProcessBuffer (testData);
gost.SetKey (ConstBufferPtr (testData, gost.GetKeySize()));
gost.EncryptBlocks (testData, testData.Size() / gost.GetBlockSize());
if (Crc32::ProcessBuffer (testData) != 0xc06e0704)
throw TestFailed (SRC_POS);
gost.DecryptBlocks (testData, testData.Size() / gost.GetBlockSize());
if (origCrc != Crc32::ProcessBuffer (testData))
throw TestFailed (SRC_POS);
}
const EncryptionTest::XtsTestVector EncryptionTest::XtsTestVectors[] =
{
/* XTS-AES-256 */
{
// IEEE 1619 - Vector 10
{ 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45, 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26, 0x62, 0x49, 0x77, 0x57, 0x24, 0x70, 0x93, 0x69, 0x99, 0x59, 0x57, 0x49, 0x66, 0x96, 0x76, 0x27 },
{ 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93, 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95, 0x02, 0x88, 0x41, 0x97, 0x16, 0x93, 0x99, 0x37, 0x51, 0x05, 0x82, 0x09, 0x74, 0x94, 0x45, 0x92 },
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff },
0,
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
0x60, 0x61, 0x62, 0x63, 0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x51
}
},
{
// IEEE 1619 - Vector 11
{ 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45, 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26, 0x62, 0x49, 0x77, 0x57, 0x24, 0x70, 0x93, 0x69, 0x99, 0x59, 0x57, 0x49, 0x66, 0x96, 0x76, 0x27 },
{ 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93, 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95, 0x02, 0x88, 0x41, 0x97, 0x16, 0x93, 0x99, 0x37, 0x51, 0x05, 0x82, 0x09, 0x74, 0x94, 0x45, 0x92 },
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff },
0,
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0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0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26, 0x62, 0x49, 0x77, 0x57, 0x24, 0x70, 0x93, 0x69, 0x99, 0x59, 0x57, 0x49, 0x66, 0x96, 0x76, 0x27 },
{ 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93, 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95, 0x02, 0x88, 0x41, 0x97, 0x16, 0x93, 0x99, 0x37, 0x51, 0x05, 0x82, 0x09, 0x74, 0x94, 0x45, 0x92 },
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff },
0,
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
0x80, 0x81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x57, 0x24, 0x70, 0x93, 0x69, 0x99, 0x59, 0x57, 0x49, 0x66, 0x96, 0x76, 0x27 },
{ 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93, 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95, 0x02, 0x88, 0x41, 0x97, 0x16, 0x93, 0x99, 0x37, 0x51, 0x05, 0x82, 0x09, 0x74, 0x94, 0x45, 0x92 },
{ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff },
0,
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8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0x89, 0xf3, 0xa9, 0x5c, 0x69, 0x63, 0x9c, 0x32, 0xcd, 0x6e, 0x1d, 0x53, 0x7a, 0x85, 0xf7, 0x5c, 0xc8, 0x44, 0x72, 0x6e, 0x8a, 0x72, 0xfc, 0x00,
0x77, 0xad, 0x22, 0x00, 0x0f, 0x1d, 0x50, 0x78, 0xf6, 0xb8, 0x66, 0x31, 0x8c, 0x66, 0x8f, 0x1a, 0xd0, 0x3d, 0x5a, 0x5f, 0xce, 0xd5, 0x21, 0x9f, 0x2e, 0xab, 0xbd, 0x0a, 0xa5, 0xc0, 0xf4, 0x60,
0xd1, 0x83, 0xf0, 0x44, 0x04, 0xa0, 0xd6, 0xf4, 0x69, 0x55, 0x8e, 0x81, 0xfa, 0xb2, 0x4a, 0x16, 0x79, 0x05, 0xab, 0x4c, 0x78, 0x78, 0x50, 0x2a, 0xd3, 0xe3, 0x8f, 0xdb, 0xe6, 0x2a, 0x41, 0x55,
0x6c, 0xec, 0x37, 0x32, 0x57, 0x59, 0x53, 0x3c, 0xe8, 0xf2, 0x5f, 0x36, 0x7c, 0x87, 0xbb, 0x55, 0x78, 0xd6, 0x67, 0xae, 0x93, 0xf9, 0xe2, 0xfd, 0x99, 0xbc, 0xbc, 0x5f, 0x2f, 0xbb, 0xa8, 0x8c,
0xf6, 0x51, 0x61, 0x39, 0x42, 0x0f, 0xcf, 0xf3, 0xb7, 0x36, 0x1d, 0x86, 0x32, 0x2c, 0x4b, 0xd8, 0x4c, 0x82, 0xf3, 0x35, 0xab, 0xb1, 0x52, 0xc4, 0xa9, 0x34, 0x11, 0x37, 0x3a, 0xaa, 0x82, 0x20
}
},
{
// IEEE 1619 - Vector 14
{ 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45, 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26, 0x62, 0x49, 0x77, 0x57, 0x24, 0x70, 0x93, 0x69, 0x99, 0x59, 0x57, 0x49, 0x66, 0x96, 0x76, 0x27 },
{ 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93, 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95, 0x02, 0x88, 0x41, 0x97, 0x16, 0x93, 0x99, 0x37, 0x51, 0x05, 0x82, 0x09, 0x74, 0x94, 0x45, 0x92 },
{ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff },
0,
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96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, 0xe6, 0x98, 0x38, 0x0b, 0xc9, 0x99, 0xb0, 0x5a, 0xbc,
0xe1, 0x9d, 0xc0, 0xc6, 0xdc, 0xc2, 0xdd, 0x00, 0x1e, 0xc5, 0x35, 0xba, 0x18, 0xde, 0xb2, 0xdf, 0x1a, 0x10, 0x10, 0x23, 0x10, 0x83, 0x18, 0xc7, 0x5d, 0xc9, 0x86, 0x11, 0xa0, 0x9d, 0xc4, 0x8a,
0x0a, 0xcd, 0xec, 0x67, 0x6f, 0xab, 0xdf, 0x22, 0x2f, 0x07, 0xe0, 0x26, 0xf0, 0x59, 0xb6, 0x72, 0xb5, 0x6e, 0x5c, 0xbc, 0x8e, 0x1d, 0x21, 0xbb, 0xd8, 0x67, 0xdd, 0x92, 0x72, 0x12, 0x05, 0x46,
0x81, 0xd7, 0x0e, 0xa7, 0x37, 0x13, 0x4c, 0xdf, 0xce, 0x93, 0xb6, 0xf8, 0x2a, 0xe2, 0x24, 0x23, 0x27, 0x4e, 0x58, 0xa0, 0x82, 0x1c, 0xc5, 0x50, 0x2e, 0x2d, 0x0a, 0xb4, 0x58, 0x5e, 0x94, 0xde,
0x69, 0x75, 0xbe, 0x5e, 0x0b, 0x4e, 0xfc, 0xe5, 0x1c, 0xd3, 0xe7, 0x0c, 0x25, 0xa1, 0xfb, 0xbb, 0xd6, 0x09, 0xd2, 0x73, 0xad, 0x5b, 0x0d, 0x59, 0x63, 0x1c, 0x53, 0x1f, 0x6a, 0x0a, 0x57, 0xb9
}
}
};
void EncryptionTest::TestXts ()
{
unsigned char buf [ENCRYPTION_DATA_UNIT_SIZE * 4];
unsigned int i;
uint32 crc;
uint64 unitNo;
uint64 nbrUnits;
uint64 writeOffset;
int testCase = 0;
int nTestsPerformed = 0;
static const byte testKey[] =
{
0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45, 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26, 0x62, 0x49, 0x77, 0x57, 0x24, 0x70, 0x93, 0x69, 0x99, 0x59, 0x57, 0x49, 0x66, 0x96, 0x76, 0x27,
0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93, 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95, 0x02, 0x88, 0x41, 0x97, 0x16, 0x93, 0x99, 0x37, 0x51, 0x05, 0x82, 0x09, 0x74, 0x94, 0x45, 0x92,
0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13
};
/* Encryption/decryption of data units (typically, volume data sectors) */
nbrUnits = sizeof (buf) / ENCRYPTION_DATA_UNIT_SIZE;
/* The buffer can accommodate 4 data units and we'll test 4 cases by "scrolling". The data unit 0xFFFFFFFFFF
will "move" from the start of the buffer to its end. For a 512-byte data unit, the byte offset 562949953420800
corresponds to the data unit 0xFFFFFFFFFF. */
for (writeOffset = 562949953420800LL;
writeOffset > 562949953420800LL - nbrUnits * ENCRYPTION_DATA_UNIT_SIZE;
writeOffset -= ENCRYPTION_DATA_UNIT_SIZE)
{
unitNo = writeOffset / ENCRYPTION_DATA_UNIT_SIZE;
// Test all EAs that support this mode of operation
foreach_ref (EncryptionAlgorithm &ea, EncryptionAlgorithm::GetAvailableAlgorithms())
{
shared_ptr mode (new EncryptionModeXTS);
if (!ea.IsModeSupported (mode))
continue;
ea.SetKey (ConstBufferPtr (testKey, ea.GetKeySize()));
Buffer modeKey (ea.GetKeySize());
for (size_t mi = 0; mi < modeKey.Size(); mi++)
modeKey[mi] = (byte) mi;
modeKey.CopyFrom (ConstBufferPtr (XtsTestVectors[array_capacity (XtsTestVectors)-1].key2, sizeof (XtsTestVectors[array_capacity (XtsTestVectors)-1].key2)));
mode->SetKey (modeKey);
ea.SetMode (mode);
// Each data unit will contain the same plaintext
for (i = 0; i < nbrUnits; i++)
{
memcpy ((unsigned char *) buf + i * ENCRYPTION_DATA_UNIT_SIZE,
XtsTestVectors[array_capacity (XtsTestVectors)-1].plaintext,
ENCRYPTION_DATA_UNIT_SIZE);
}
ea.EncryptSectors (buf, unitNo, nbrUnits, ENCRYPTION_DATA_UNIT_SIZE);
crc = GetCrc32 (buf, sizeof (buf));
if (typeid (ea) == typeid (GOST))
{
// CRC of all data units in the buffer for each test case
switch (testCase)
{
case 0:
if (crc != 0x50ae4605)
throw TestFailed (SRC_POS);
nTestsPerformed++;
break;
case 1:
if (crc != 0xaabf7dca)
throw TestFailed (SRC_POS);
nTestsPerformed++;
break;
case 2:
if (crc != 0x6cae5f6d)
throw TestFailed (SRC_POS);
nTestsPerformed++;
break;
case 3:
if (crc != 0xcb608e0b)
throw TestFailed (SRC_POS);
nTestsPerformed++;
break;
}
}
if (crc == 0x9f5edd58)
throw TestFailed (SRC_POS);
ea.DecryptSectors (buf, unitNo, nbrUnits, ENCRYPTION_DATA_UNIT_SIZE);
if (GetCrc32 (buf, sizeof (buf)) != 0x9f5edd58)
throw TestFailed (SRC_POS);
nTestsPerformed++;
}
testCase++;
}
/* Encryption/decryption of a buffer (typically, a volume header) */
nbrUnits = sizeof (buf) / ENCRYPTION_DATA_UNIT_SIZE;
// Test all EAs that support this mode of operation
foreach_ref (EncryptionAlgorithm &ea, EncryptionAlgorithm::GetAvailableAlgorithms())
{
shared_ptr mode (new EncryptionModeXTS);
if (!ea.IsModeSupported (mode))
continue;
ea.SetKey (ConstBufferPtr (testKey, ea.GetKeySize()));
Buffer modeKey (ea.GetKeySize());
for (size_t mi = 0; mi < modeKey.Size(); mi++)
modeKey[mi] = (byte) mi;
modeKey.CopyFrom (ConstBufferPtr (XtsTestVectors[array_capacity (XtsTestVectors)-1].key2, sizeof (XtsTestVectors[array_capacity (XtsTestVectors)-1].key2)));
mode->SetKey (modeKey);
ea.SetMode (mode);
// Each data unit will contain the same plaintext
for (i = 0; i < nbrUnits; i++)
{
memcpy ((unsigned char *) buf + i * ENCRYPTION_DATA_UNIT_SIZE,
XtsTestVectors[array_capacity (XtsTestVectors)-1].plaintext,
ENCRYPTION_DATA_UNIT_SIZE);
}
ea.Encrypt (buf, sizeof (buf));
crc = GetCrc32 (buf, sizeof (buf));
if (typeid (ea) == typeid (GOST))
{
if (crc != 0xf0109bdf)
throw TestFailed (SRC_POS);
nTestsPerformed++;
}
if (crc == 0x9f5edd58)
throw TestFailed (SRC_POS);
ea.Decrypt (buf, sizeof (buf));
if (GetCrc32 (buf, sizeof (buf)) != 0x9f5edd58)
throw TestFailed (SRC_POS);
nTestsPerformed++;
}
if (nTestsPerformed != 10)
throw TestFailed (SRC_POS);
}
void EncryptionTest::TestPkcs5 ()
{
VolumePassword password ("password", 8);
static const byte saltData[] = { 0x12, 0x34, 0x56, 0x78 };
ConstBufferPtr salt (saltData, sizeof (saltData));
Buffer derivedKey (4);
Pkcs5HmacWhirlpool pkcs5HmacWhirlpool;
pkcs5HmacWhirlpool.DeriveKey (derivedKey, password, salt, 5);
if (memcmp (derivedKey.Ptr(), "\x50\x7c\x36\x6f", 4) != 0)
throw TestFailed (SRC_POS);
Pkcs5HmacStribog pkcs5HmacStribog;
pkcs5HmacStribog.DeriveKey (derivedKey, password, salt, 5);
if (memcmp (derivedKey.Ptr(), "\xc7\x13\x56\xb6", 4) != 0)
throw TestFailed (SRC_POS);
Pkcs5HmacGostHash pkcs5HmacGostHash;
pkcs5HmacGostHash.DeriveKey (derivedKey, password, salt, 5);
if (memcmp (derivedKey.Ptr(), "\x7d\x53\xe0\x7e", 4) != 0)
throw TestFailed (SRC_POS);
}
}
GostCrypt_MacOSX_1.0/Volume/._EncryptionTest.h 000755 000765 000024 00000000261 12361324353 021331 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/EncryptionTest.h 000755 000765 000024 00000002176 12361324353 021123 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Encryption_EncryptionTest
#define GST_HEADER_Encryption_EncryptionTest
#include "Platform/Platform.h"
#include "Common/Crypto.h"
namespace GostCrypt
{
class EncryptionTest
{
public:
static void TestAll ();
static void TestAll (bool enableCpuEncryptionSupport);
protected:
static void TestCiphers ();
static void TestPkcs5 ();
static void TestXts ();
struct XtsTestVector
{
byte key1[32];
byte key2[32];
byte dataUnitNo[8];
unsigned int blockNo;
byte plaintext[ENCRYPTION_DATA_UNIT_SIZE];
byte ciphertext[ENCRYPTION_DATA_UNIT_SIZE];
};
static const XtsTestVector XtsTestVectors[];
private:
EncryptionTest ();
virtual ~EncryptionTest ();
EncryptionTest (const EncryptionTest &);
EncryptionTest &operator= (const EncryptionTest &);
};
}
#endif // GST_HEADER_Encryption_EncryptionTest
GostCrypt_MacOSX_1.0/Volume/._EncryptionThreadPool.cpp 000755 000765 000024 00000000261 12361324353 023006 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/EncryptionThreadPool.cpp 000755 000765 000024 00000017220 12361324353 022574 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifdef GST_UNIX
# include
#endif
#ifdef GST_MACOSX
# include
# include
#endif
#include "Platform/SyncEvent.h"
#include "Platform/SystemLog.h"
#include "Common/Crypto.h"
#include "EncryptionThreadPool.h"
namespace GostCrypt
{
void EncryptionThreadPool::DoWork (WorkType::Enum type, const EncryptionMode *encryptionMode, byte *data, uint64 startUnitNo, uint64 unitCount, size_t sectorSize)
{
size_t fragmentCount;
size_t unitsPerFragment;
size_t remainder;
byte *fragmentData;
uint64 fragmentStartUnitNo;
WorkItem *workItem;
WorkItem *firstFragmentWorkItem;
if (unitCount == 0)
return;
if (!ThreadPoolRunning || unitCount == 1)
{
switch (type)
{
case WorkType::DecryptDataUnits:
encryptionMode->DecryptSectorsCurrentThread (data, startUnitNo, unitCount, sectorSize);
break;
case WorkType::EncryptDataUnits:
encryptionMode->EncryptSectorsCurrentThread (data, startUnitNo, unitCount, sectorSize);
break;
default:
throw ParameterIncorrect (SRC_POS);
}
return;
}
if (unitCount <= ThreadCount)
{
fragmentCount = (size_t) unitCount;
unitsPerFragment = 1;
remainder = 0;
}
else
{
fragmentCount = ThreadCount;
unitsPerFragment = (size_t) unitCount / ThreadCount;
remainder = (size_t) unitCount % ThreadCount;
if (remainder > 0)
++unitsPerFragment;
}
fragmentData = data;
fragmentStartUnitNo = startUnitNo;
{
ScopeLock lock (EnqueueMutex);
firstFragmentWorkItem = &WorkItemQueue[EnqueuePosition];
while (firstFragmentWorkItem->State != WorkItem::State::Free)
{
WorkItemCompletedEvent.Wait();
}
firstFragmentWorkItem->OutstandingFragmentCount.Set (fragmentCount);
firstFragmentWorkItem->ItemException.reset();
while (fragmentCount-- > 0)
{
workItem = &WorkItemQueue[EnqueuePosition++];
if (EnqueuePosition >= QueueSize)
EnqueuePosition = 0;
while (workItem->State != WorkItem::State::Free)
{
WorkItemCompletedEvent.Wait();
}
workItem->Type = type;
workItem->FirstFragment = firstFragmentWorkItem;
workItem->Encryption.Mode = encryptionMode;
workItem->Encryption.Data = fragmentData;
workItem->Encryption.UnitCount = unitsPerFragment;
workItem->Encryption.StartUnitNo = fragmentStartUnitNo;
workItem->Encryption.SectorSize = sectorSize;
fragmentData += unitsPerFragment * ENCRYPTION_DATA_UNIT_SIZE;
fragmentStartUnitNo += unitsPerFragment;
if (remainder > 0 && --remainder == 0)
--unitsPerFragment;
workItem->State.Set (WorkItem::State::Ready);
WorkItemReadyEvent.Signal();
}
}
firstFragmentWorkItem->ItemCompletedEvent.Wait();
auto_ptr itemException;
if (firstFragmentWorkItem->ItemException.get())
itemException = firstFragmentWorkItem->ItemException;
firstFragmentWorkItem->State.Set (WorkItem::State::Free);
WorkItemCompletedEvent.Signal();
if (itemException.get())
itemException->Throw();
}
void EncryptionThreadPool::Start ()
{
if (ThreadPoolRunning)
return;
size_t cpuCount;
#ifdef GST_WINDOWS
SYSTEM_INFO sysInfo;
GetSystemInfo (&sysInfo);
cpuCount = sysInfo.dwNumberOfProcessors;
#elif defined (_SC_NPROCESSORS_ONLN)
cpuCount = (size_t) sysconf (_SC_NPROCESSORS_ONLN);
if (cpuCount == (size_t) -1)
cpuCount = 1;
#elif defined (GST_MACOSX)
int cpuCountSys;
int mib[2] = { CTL_HW, HW_NCPU };
size_t len = sizeof (cpuCountSys);
if (sysctl (mib, 2, &cpuCountSys, &len, nullptr, 0) == -1)
cpuCountSys = 1;
cpuCount = (size_t) cpuCountSys;
#else
# error Cannot determine CPU count
#endif
if (cpuCount < 2)
return;
if (cpuCount > MaxThreadCount)
cpuCount = MaxThreadCount;
StopPending = false;
DequeuePosition = 0;
EnqueuePosition = 0;
for (size_t i = 0; i < sizeof (WorkItemQueue) / sizeof (WorkItemQueue[0]); ++i)
{
WorkItemQueue[i].State.Set (WorkItem::State::Free);
}
try
{
for (ThreadCount = 0; ThreadCount < cpuCount; ++ThreadCount)
{
struct ThreadFunctor : public Functor
{
virtual void operator() ()
{
WorkThreadProc();
}
};
make_shared_auto (Thread, thread);
thread->Start (new ThreadFunctor ());
RunningThreads.push_back (thread);
}
}
catch (...)
{
try
{
ThreadPoolRunning = true;
Stop();
} catch (...) { }
throw;
}
ThreadPoolRunning = true;
}
void EncryptionThreadPool::Stop ()
{
if (!ThreadPoolRunning)
return;
StopPending = true;
WorkItemReadyEvent.Signal();
foreach_ref (const Thread &thread, RunningThreads)
{
thread.Join();
}
ThreadCount = 0;
ThreadPoolRunning = false;
}
void EncryptionThreadPool::WorkThreadProc ()
{
try
{
WorkItem *workItem;
while (!StopPending)
{
{
ScopeLock lock (DequeueMutex);
workItem = &WorkItemQueue[DequeuePosition++];
if (DequeuePosition >= QueueSize)
DequeuePosition = 0;
while (!StopPending && workItem->State != WorkItem::State::Ready)
{
WorkItemReadyEvent.Wait();
}
workItem->State.Set (WorkItem::State::Busy);
}
if (StopPending)
break;
try
{
switch (workItem->Type)
{
case WorkType::DecryptDataUnits:
workItem->Encryption.Mode->DecryptSectorsCurrentThread (workItem->Encryption.Data, workItem->Encryption.StartUnitNo, workItem->Encryption.UnitCount, workItem->Encryption.SectorSize);
break;
case WorkType::EncryptDataUnits:
workItem->Encryption.Mode->EncryptSectorsCurrentThread (workItem->Encryption.Data, workItem->Encryption.StartUnitNo, workItem->Encryption.UnitCount, workItem->Encryption.SectorSize);
break;
default:
throw ParameterIncorrect (SRC_POS);
}
}
catch (Exception &e)
{
workItem->FirstFragment->ItemException.reset (e.CloneNew());
}
catch (exception &e)
{
workItem->FirstFragment->ItemException.reset (new ExternalException (SRC_POS, StringConverter::ToExceptionString (e)));
}
catch (...)
{
workItem->FirstFragment->ItemException.reset (new UnknownException (SRC_POS));
}
if (workItem != workItem->FirstFragment)
{
workItem->State.Set (WorkItem::State::Free);
WorkItemCompletedEvent.Signal();
}
if (workItem->FirstFragment->OutstandingFragmentCount.Decrement() == 0)
workItem->FirstFragment->ItemCompletedEvent.Signal();
}
}
catch (exception &e)
{
SystemLog::WriteException (e);
}
catch (...)
{
SystemLog::WriteException (UnknownException (SRC_POS));
}
}
volatile bool EncryptionThreadPool::ThreadPoolRunning = false;
volatile bool EncryptionThreadPool::StopPending = false;
size_t EncryptionThreadPool::ThreadCount;
EncryptionThreadPool::WorkItem EncryptionThreadPool::WorkItemQueue[QueueSize];
volatile size_t EncryptionThreadPool::EnqueuePosition;
volatile size_t EncryptionThreadPool::DequeuePosition;
Mutex EncryptionThreadPool::EnqueueMutex;
Mutex EncryptionThreadPool::DequeueMutex;
SyncEvent EncryptionThreadPool::WorkItemReadyEvent;
SyncEvent EncryptionThreadPool::WorkItemCompletedEvent;
list < shared_ptr > EncryptionThreadPool::RunningThreads;
}
GostCrypt_MacOSX_1.0/Volume/._EncryptionThreadPool.h 000755 000765 000024 00000000261 12361324353 022453 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/EncryptionThreadPool.h 000755 000765 000024 00000004002 12361324353 022233 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Volume_EncryptionThreadPool
#define GST_HEADER_Volume_EncryptionThreadPool
#include "Platform/Platform.h"
#include "EncryptionMode.h"
namespace GostCrypt
{
class EncryptionThreadPool
{
public:
struct WorkType
{
enum Enum
{
EncryptDataUnits,
DecryptDataUnits,
DeriveKey
};
};
struct WorkItem
{
struct State
{
enum Enum
{
Free,
Ready,
Busy
};
};
struct WorkItem *FirstFragment;
auto_ptr ItemException;
SyncEvent ItemCompletedEvent;
SharedVal OutstandingFragmentCount;
SharedVal State;
WorkType::Enum Type;
union
{
struct
{
const EncryptionMode *Mode;
byte *Data;
uint64 StartUnitNo;
uint64 UnitCount;
size_t SectorSize;
} Encryption;
};
};
static void DoWork (WorkType::Enum type, const EncryptionMode *mode, byte *data, uint64 startUnitNo, uint64 unitCount, size_t sectorSize);
static bool IsRunning () { return ThreadPoolRunning; }
static void Start ();
static void Stop ();
protected:
static void WorkThreadProc ();
static const size_t MaxThreadCount = 32;
static const size_t QueueSize = MaxThreadCount * 2;
static Mutex DequeueMutex;
static volatile size_t DequeuePosition;
static volatile size_t EnqueuePosition;
static Mutex EnqueueMutex;
static list < shared_ptr > RunningThreads;
static volatile bool StopPending;
static size_t ThreadCount;
static volatile bool ThreadPoolRunning;
static SyncEvent WorkItemCompletedEvent;
static WorkItem WorkItemQueue[QueueSize];
static SyncEvent WorkItemReadyEvent;
};
}
#endif // GST_HEADER_Volume_EncryptionThreadPool
GostCrypt_MacOSX_1.0/Volume/._Hash.cpp 000755 000765 000024 00000000261 12361324353 017555 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/Hash.cpp 000755 000765 000024 00000005146 12361324353 017347 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "Hash.h"
#include "Crypto/Whirlpool.h"
#include "Crypto/Stribog.h"
#include "Crypto/GostHash.h"
namespace GostCrypt
{
HashList Hash::GetAvailableAlgorithms ()
{
HashList l;
l.push_back (shared_ptr (new Stribog ()));
l.push_back (shared_ptr (new GostHash ()));
l.push_back (shared_ptr (new Whirlpool ()));
return l;
}
void Hash::ValidateDataParameters (const ConstBufferPtr &data) const
{
if (data.Size() < 1)
throw ParameterIncorrect (SRC_POS);
}
void Hash::ValidateDigestParameters (const BufferPtr &buffer) const
{
if (buffer.Size() != GetDigestSize ())
throw ParameterIncorrect (SRC_POS);
}
// Whirlpool
Whirlpool::Whirlpool ()
{
Context.Allocate (sizeof (WHIRLPOOL_CTX));
Init();
}
void Whirlpool::GetDigest (const BufferPtr &buffer)
{
if_debug (ValidateDigestParameters (buffer));
WHIRLPOOL_finalize ((WHIRLPOOL_CTX *) Context.Ptr(), buffer);
}
void Whirlpool::Init ()
{
WHIRLPOOL_init ((WHIRLPOOL_CTX *) Context.Ptr());
}
void Whirlpool::ProcessData (const ConstBufferPtr &data)
{
if_debug (ValidateDataParameters (data));
WHIRLPOOL_add (data.Get(), (int) data.Size() * 8, (WHIRLPOOL_CTX *) Context.Ptr());
}
// Stribog
Stribog::Stribog ()
{
Context.Allocate (sizeof (STRIBOG_CTX));
Init ();
}
void Stribog::GetDigest (const BufferPtr &buffer)
{
if_debug (ValidateDigestParameters (buffer));
STRIBOG_finalize ((STRIBOG_CTX *) Context.Ptr(), buffer);
}
void Stribog::Init ()
{
STRIBOG_init ((STRIBOG_CTX *) Context.Ptr());
}
void Stribog::ProcessData (const ConstBufferPtr &data)
{
if_debug (ValidateDataParameters (data));
STRIBOG_add ((STRIBOG_CTX *) Context.Ptr(), (byte *) data.Get(), data.Size());
}
// GOST R 34.11-94
GostHash::GostHash ()
{
Context.Allocate (sizeof (gost_hash_ctx));
Init ();
}
void GostHash::GetDigest (const BufferPtr &buffer)
{
if_debug (ValidateDigestParameters (buffer));
GOSTHASH_finalize ((gost_hash_ctx *) Context.Ptr(), buffer);
}
void GostHash::Init ()
{
GOSTHASH_init ((gost_hash_ctx *) Context.Ptr());
}
void GostHash::ProcessData (const ConstBufferPtr &data)
{
if_debug (ValidateDataParameters (data));
GOSTHASH_add ((byte *) data.Get(), data.Size(), (gost_hash_ctx *) Context.Ptr());
}
}
GostCrypt_MacOSX_1.0/Volume/._Hash.h 000755 000765 000024 00000000261 12361324353 017222 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/Hash.h 000755 000765 000024 00000006147 12361324353 017016 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Encryption_Hash
#define GST_HEADER_Encryption_Hash
#include "Platform/Platform.h"
namespace GostCrypt
{
class Hash;
typedef list < shared_ptr > HashList;
class Hash
{
public:
Hash () : Deprecated (false) { }
virtual ~Hash () { }
static HashList GetAvailableAlgorithms ();
virtual void GetDigest (const BufferPtr &buffer) = 0;
virtual size_t GetBlockSize () const = 0;
virtual size_t GetDigestSize () const = 0;
virtual wstring GetName () const = 0;
virtual shared_ptr GetNew () const = 0;
virtual void Init () = 0;
bool IsDeprecated () const { return Deprecated; }
virtual void ProcessData (const ConstBufferPtr &data) = 0;
virtual void ValidateDataParameters (const ConstBufferPtr &data) const;
virtual void ValidateDigestParameters (const BufferPtr &buffer) const;
protected:
SecureBuffer Context;
bool Deprecated;
private:
Hash (const Hash &);
Hash &operator= (const Hash &);
};
// Whirlpool
class Whirlpool : public Hash
{
public:
Whirlpool ();
virtual ~Whirlpool () { }
virtual void GetDigest (const BufferPtr &buffer);
virtual size_t GetBlockSize () const { return 64; }
virtual size_t GetDigestSize () const { return 512 / 8; }
virtual wstring GetName () const { return L"Whirlpool"; }
virtual shared_ptr GetNew () const { return shared_ptr (new Whirlpool); }
virtual void Init ();
virtual void ProcessData (const ConstBufferPtr &data);
protected:
private:
Whirlpool (const Whirlpool &);
Whirlpool &operator= (const Whirlpool &);
};
// Stribog
class Stribog : public Hash
{
public:
Stribog ();
virtual ~Stribog () { }
virtual void GetDigest (const BufferPtr &buffer);
virtual size_t GetBlockSize () const { return 64; }
virtual size_t GetDigestSize () const { return 64; }
virtual wstring GetName () const { return L"GOST R 34.11-2012"; }
virtual shared_ptr GetNew () const { return shared_ptr (new Stribog); }
virtual void Init ();
virtual void ProcessData (const ConstBufferPtr &data);
protected:
private:
Stribog (const Stribog &);
Stribog &operator= (const Stribog &);
};
// GOST R 34.11-94
class GostHash : public Hash
{
public:
GostHash ();
virtual ~GostHash () { }
virtual void GetDigest (const BufferPtr &buffer);
virtual size_t GetBlockSize () const { return 32; }
virtual size_t GetDigestSize () const { return 32; }
virtual wstring GetName () const { return L"GOST R 34.11-94"; }
virtual shared_ptr GetNew () const { return shared_ptr (new GostHash); }
virtual void Init ();
virtual void ProcessData (const ConstBufferPtr &data);
protected:
private:
GostHash (const GostHash &);
GostHash &operator= (const GostHash &);
};
}
#endif // GST_HEADER_Encryption_Hash
GostCrypt_MacOSX_1.0/Volume/._Keyfile.cpp 000755 000765 000024 00000000261 12361324353 020262 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/Keyfile.cpp 000755 000765 000024 00000010746 12361324353 020056 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "Platform/Serializer.h"
#include "Common/SecurityToken.h"
#include "Crc32.h"
#include "Keyfile.h"
#include "VolumeException.h"
namespace GostCrypt
{
void Keyfile::Apply (const BufferPtr &pool) const
{
if (Path.IsDirectory())
throw ParameterIncorrect (SRC_POS);
File file;
Crc32 crc32;
size_t poolPos = 0;
uint64 totalLength = 0;
uint64 readLength;
SecureBuffer keyfileBuf (File::GetOptimalReadSize());
if (SecurityToken::IsKeyfilePathValid (Path))
{
// Apply keyfile generated by a security token
vector keyfileData;
SecurityToken::GetKeyfileData (SecurityTokenKeyfile (wstring (Path)), keyfileData);
if (keyfileData.size() < MinProcessedLength)
throw InsufficientData (SRC_POS, Path);
for (size_t i = 0; i < keyfileData.size(); i++)
{
uint32 crc = crc32.Process (keyfileData[i]);
pool[poolPos++] += (byte) (crc >> 24);
pool[poolPos++] += (byte) (crc >> 16);
pool[poolPos++] += (byte) (crc >> 8);
pool[poolPos++] += (byte) crc;
if (poolPos >= pool.Size())
poolPos = 0;
if (++totalLength >= MaxProcessedLength)
break;
}
Memory::Erase (&keyfileData.front(), keyfileData.size());
goto done;
}
file.Open (Path, File::OpenRead, File::ShareRead);
while ((readLength = file.Read (keyfileBuf)) > 0)
{
for (size_t i = 0; i < readLength; i++)
{
uint32 crc = crc32.Process (keyfileBuf[i]);
pool[poolPos++] += (byte) (crc >> 24);
pool[poolPos++] += (byte) (crc >> 16);
pool[poolPos++] += (byte) (crc >> 8);
pool[poolPos++] += (byte) crc;
if (poolPos >= pool.Size())
poolPos = 0;
if (++totalLength >= MaxProcessedLength)
goto done;
}
}
done:
if (totalLength < MinProcessedLength)
throw InsufficientData (SRC_POS, Path);
}
shared_ptr Keyfile::ApplyListToPassword (shared_ptr keyfiles, shared_ptr password)
{
if (!password)
password.reset (new VolumePassword);
if (!keyfiles || keyfiles->size() < 1)
return password;
KeyfileList keyfilesExp;
HiddenFileWasPresentInKeyfilePath = false;
// Enumerate directories
foreach (shared_ptr keyfile, *keyfiles)
{
if (FilesystemPath (*keyfile).IsDirectory())
{
size_t keyfileCount = 0;
foreach_ref (const FilePath &path, Directory::GetFilePaths (*keyfile))
{
#ifdef GST_UNIX
// Skip hidden files
if (wstring (path.ToBaseName()).find (L'.') == 0)
{
HiddenFileWasPresentInKeyfilePath = true;
continue;
}
#endif
keyfilesExp.push_back (make_shared (path));
++keyfileCount;
}
if (keyfileCount == 0)
throw KeyfilePathEmpty (SRC_POS, FilesystemPath (*keyfile));
}
else
{
keyfilesExp.push_back (keyfile);
}
}
make_shared_auto (VolumePassword, newPassword);
if (keyfilesExp.size() < 1)
{
newPassword->Set (*password);
}
else
{
SecureBuffer keyfilePool (VolumePassword::MaxSize);
// Pad password with zeros if shorter than max length
keyfilePool.Zero();
keyfilePool.CopyFrom (ConstBufferPtr (password->DataPtr(), password->Size()));
// Apply all keyfiles
foreach_ref (const Keyfile &k, keyfilesExp)
{
k.Apply (keyfilePool);
}
newPassword->Set (keyfilePool);
}
return newPassword;
}
shared_ptr Keyfile::DeserializeList (shared_ptr stream, const string &name)
{
shared_ptr keyfiles;
Serializer sr (stream);
if (!sr.DeserializeBool (name + "Null"))
{
keyfiles.reset (new KeyfileList);
foreach (const wstring &k, sr.DeserializeWStringList (name))
keyfiles->push_back (make_shared (k));
}
return keyfiles;
}
void Keyfile::SerializeList (shared_ptr stream, const string &name, shared_ptr keyfiles)
{
Serializer sr (stream);
sr.Serialize (name + "Null", keyfiles == nullptr);
if (keyfiles)
{
list sl;
foreach_ref (const Keyfile &k, *keyfiles)
sl.push_back (FilesystemPath (k));
sr.Serialize (name, sl);
}
}
bool Keyfile::HiddenFileWasPresentInKeyfilePath = false;
}
GostCrypt_MacOSX_1.0/Volume/._Keyfile.h 000755 000765 000024 00000000261 12361324353 017727 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/Keyfile.h 000755 000765 000024 00000003055 12361324353 017516 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Encryption_Keyfile
#define GST_HEADER_Encryption_Keyfile
#include "Platform/Platform.h"
#include "Platform/Stream.h"
#include "VolumePassword.h"
namespace GostCrypt
{
class Keyfile;
typedef list < shared_ptr > KeyfileList;
class Keyfile
{
public:
Keyfile (const FilesystemPath &path) : Path (path) { }
virtual ~Keyfile () { };
operator FilesystemPath () const { return Path; }
static shared_ptr ApplyListToPassword (shared_ptr keyfiles, shared_ptr password);
static shared_ptr DeserializeList (shared_ptr stream, const string &name);
static void SerializeList (shared_ptr stream, const string &name, shared_ptr keyfiles);
static bool WasHiddenFilePresentInKeyfilePath() { bool r = HiddenFileWasPresentInKeyfilePath; HiddenFileWasPresentInKeyfilePath = false; return r; }
static const size_t MinProcessedLength = 1;
static const size_t MaxProcessedLength = 1024 * 1024;
protected:
void Apply (const BufferPtr &pool) const;
static bool HiddenFileWasPresentInKeyfilePath;
FilesystemPath Path;
private:
Keyfile (const Keyfile &);
Keyfile &operator= (const Keyfile &);
};
}
#endif // GST_HEADER_Encryption_Keyfile
GostCrypt_MacOSX_1.0/Volume/._Pkcs5Kdf.cpp 000755 000765 000024 00000000261 12361324353 020304 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/Pkcs5Kdf.cpp 000755 000765 000024 00000005461 12361324353 020076 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "Common/Pkcs5.h"
#include "Pkcs5Kdf.h"
#include "VolumePassword.h"
namespace GostCrypt
{
Pkcs5Kdf::Pkcs5Kdf ()
{
}
Pkcs5Kdf::~Pkcs5Kdf ()
{
}
void Pkcs5Kdf::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt) const
{
DeriveKey (key, password, salt, GetIterationCount());
}
shared_ptr Pkcs5Kdf::GetAlgorithm (const wstring &name)
{
foreach (shared_ptr kdf, GetAvailableAlgorithms())
{
if (kdf->GetName() == name)
return kdf;
}
throw ParameterIncorrect (SRC_POS);
}
shared_ptr Pkcs5Kdf::GetAlgorithm (const Hash &hash)
{
foreach (shared_ptr kdf, GetAvailableAlgorithms())
{
if (typeid (*kdf->GetHash()) == typeid (hash))
return kdf;
}
throw ParameterIncorrect (SRC_POS);
}
Pkcs5KdfList Pkcs5Kdf::GetAvailableAlgorithms ()
{
Pkcs5KdfList l;
l.push_back (shared_ptr (new Pkcs5HmacStribog ()));
l.push_back (shared_ptr (new Pkcs5HmacGostHash()));
l.push_back (shared_ptr (new Pkcs5HmacWhirlpool ()));
return l;
}
void Pkcs5Kdf::ValidateParameters (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const
{
if (key.Size() < 1 || password.Size() < 1 || salt.Size() < 1 || iterationCount < 1)
throw ParameterIncorrect (SRC_POS);
}
void Pkcs5HmacWhirlpool::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const
{
ValidateParameters (key, password, salt, iterationCount);
derive_key_whirlpool ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size());
}
void Pkcs5HmacStribog::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const
{
ValidateParameters (key, password, salt, iterationCount);
derive_key_stribog ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size());
}
void Pkcs5HmacGostHash::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const
{
ValidateParameters (key, password, salt, iterationCount);
derive_key_gosthash ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size());
}
}
GostCrypt_MacOSX_1.0/Volume/._Pkcs5Kdf.h 000755 000765 000024 00000000261 12361324353 017751 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/Pkcs5Kdf.h 000755 000765 000024 00000006462 12361324353 017545 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Encryption_Pkcs5
#define GST_HEADER_Encryption_Pkcs5
#include "Platform/Platform.h"
#include "Hash.h"
#include "VolumePassword.h"
namespace GostCrypt
{
class Pkcs5Kdf;
typedef list < shared_ptr > Pkcs5KdfList;
class Pkcs5Kdf
{
public:
virtual ~Pkcs5Kdf ();
virtual void DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt) const;
virtual void DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const = 0;
static shared_ptr GetAlgorithm (const wstring &name);
static shared_ptr GetAlgorithm (const Hash &hash);
static Pkcs5KdfList GetAvailableAlgorithms ();
virtual shared_ptr GetHash () const = 0;
virtual int GetIterationCount () const = 0;
virtual wstring GetName () const = 0;
virtual bool IsDeprecated () const { return GetHash()->IsDeprecated(); }
protected:
Pkcs5Kdf ();
void ValidateParameters (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const;
private:
Pkcs5Kdf (const Pkcs5Kdf &);
Pkcs5Kdf &operator= (const Pkcs5Kdf &);
};
class Pkcs5HmacWhirlpool : public Pkcs5Kdf
{
public:
Pkcs5HmacWhirlpool () { }
virtual ~Pkcs5HmacWhirlpool () { }
virtual void DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const;
virtual shared_ptr GetHash () const { return shared_ptr (new Whirlpool); }
virtual int GetIterationCount () const { return 1000; }
virtual wstring GetName () const { return L"HMAC-Whirlpool"; }
private:
Pkcs5HmacWhirlpool (const Pkcs5HmacWhirlpool &);
Pkcs5HmacWhirlpool &operator= (const Pkcs5HmacWhirlpool &);
};
class Pkcs5HmacStribog : public Pkcs5Kdf
{
public:
Pkcs5HmacStribog () { }
virtual ~Pkcs5HmacStribog () { }
virtual void DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const;
virtual shared_ptr GetHash () const { return shared_ptr (new Stribog); }
virtual int GetIterationCount () const { return 1000; }
virtual wstring GetName () const { return L"HMAC-GOST R 34.11-2012"; }
private:
Pkcs5HmacStribog (const Pkcs5HmacStribog &);
Pkcs5HmacStribog &operator= (const Pkcs5HmacStribog &);
};
class Pkcs5HmacGostHash : public Pkcs5Kdf
{
public:
Pkcs5HmacGostHash () { }
virtual ~Pkcs5HmacGostHash () { }
virtual void DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const;
virtual shared_ptr GetHash () const { return shared_ptr (new GostHash); }
virtual int GetIterationCount () const { return 1000; }
virtual wstring GetName () const { return L"HMAC-GOST R 34.11-94"; }
private:
Pkcs5HmacGostHash (const Pkcs5HmacGostHash &);
Pkcs5HmacGostHash &operator= (const Pkcs5HmacGostHash &);
};
}
#endif // GST_HEADER_Encryption_Pkcs5
GostCrypt_MacOSX_1.0/Volume/._Version.h 000755 000765 000024 00000000261 12361324353 017764 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/Version.h 000755 000765 000024 00000001163 12361324353 017551 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Volume_Version
#define GST_HEADER_Volume_Version
#include "Platform/PlatformBase.h"
#include "Common/Gstdefs.h"
namespace GostCrypt
{
class Version
{
public:
static const string String () { return VERSION_STRING; }
static const uint16 Number () { return VERSION_NUM; }
};
}
#endif // GST_HEADER_Volume_Version
GostCrypt_MacOSX_1.0/Volume/._Volume.cpp 000755 000765 000024 00000000261 12361324353 020141 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/Volume.cpp 000755 000765 000024 00000027567 12361324353 017746 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008-2010 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_WINDOWS
#include
#endif
#include "EncryptionModeLRW.h"
#include "EncryptionModeXTS.h"
#include "Volume.h"
#include "VolumeHeader.h"
#include "VolumeLayout.h"
#include "Common/Crypto.h"
namespace GostCrypt
{
Volume::Volume ()
: HiddenVolumeProtectionTriggered (false),
SystemEncryption (false),
VolumeDataSize (0),
TopWriteOffset (0),
TotalDataRead (0),
TotalDataWritten (0)
{
}
Volume::~Volume ()
{
}
void Volume::CheckProtectedRange (uint64 writeHostOffset, uint64 writeLength)
{
uint64 writeHostEndOffset = writeHostOffset + writeLength - 1;
if ((writeHostOffset < ProtectedRangeStart) ? (writeHostEndOffset >= ProtectedRangeStart) : (writeHostOffset <= ProtectedRangeEnd - 1))
{
HiddenVolumeProtectionTriggered = true;
throw VolumeProtected (SRC_POS);
}
}
void Volume::Close ()
{
if (VolumeFile.get() == nullptr)
throw NotInitialized (SRC_POS);
VolumeFile.reset();
}
shared_ptr Volume::GetEncryptionAlgorithm () const
{
if_debug (ValidateState ());
return EA;
}
shared_ptr Volume::GetEncryptionMode () const
{
if_debug (ValidateState ());
return EA->GetMode();
}
void Volume::Open (const VolumePath &volumePath, bool preserveTimestamps, shared_ptr password, shared_ptr keyfiles, VolumeProtection::Enum protection, shared_ptr protectionPassword, shared_ptr protectionKeyfiles, bool sharedAccessAllowed, VolumeType::Enum volumeType, bool useBackupHeaders, bool partitionInSystemEncryptionScope)
{
make_shared_auto (File, file);
File::FileOpenFlags flags = (preserveTimestamps ? File::PreserveTimestamps : File::FlagsNone);
try
{
if (protection == VolumeProtection::ReadOnly)
file->Open (volumePath, File::OpenRead, File::ShareRead, flags);
else
file->Open (volumePath, File::OpenReadWrite, File::ShareNone, flags);
}
catch (SystemException &e)
{
if (e.GetErrorCode() ==
#ifdef GST_WINDOWS
ERROR_SHARING_VIOLATION)
#else
EAGAIN)
#endif
{
if (!sharedAccessAllowed)
throw VolumeHostInUse (SRC_POS);
file->Open (volumePath, protection == VolumeProtection::ReadOnly ? File::OpenRead : File::OpenReadWrite, File::ShareReadWriteIgnoreLock, flags);
}
else
throw;
}
return Open (file, password, keyfiles, protection, protectionPassword, protectionKeyfiles, volumeType, useBackupHeaders, partitionInSystemEncryptionScope);
}
void Volume::Open (shared_ptr volumeFile, shared_ptr password, shared_ptr keyfiles, VolumeProtection::Enum protection, shared_ptr protectionPassword, shared_ptr protectionKeyfiles, VolumeType::Enum volumeType, bool useBackupHeaders, bool partitionInSystemEncryptionScope)
{
if (!volumeFile)
throw ParameterIncorrect (SRC_POS);
Protection = protection;
VolumeFile = volumeFile;
SystemEncryption = partitionInSystemEncryptionScope;
try
{
VolumeHostSize = VolumeFile->Length();
shared_ptr passwordKey = Keyfile::ApplyListToPassword (keyfiles, password);
bool skipLayoutV1Normal = false;
bool deviceHosted = GetPath().IsDevice();
size_t hostDeviceSectorSize = 0;
if (deviceHosted)
hostDeviceSectorSize = volumeFile->GetDeviceSectorSize();
// Test volume layouts
foreach (shared_ptr layout, VolumeLayout::GetAvailableLayouts (volumeType))
{
if (skipLayoutV1Normal && typeid (*layout) == typeid (VolumeLayoutV1Normal))
{
// Skip VolumeLayoutV1Normal as it shares header location with VolumeLayoutV2Normal
continue;
}
if (useBackupHeaders && !layout->HasBackupHeader())
continue;
if (typeid (*layout) == typeid (VolumeLayoutV1Hidden)
&& deviceHosted
&& hostDeviceSectorSize != GST_SECTOR_SIZE_LEGACY)
{
continue;
}
SecureBuffer headerBuffer (layout->GetHeaderSize());
if (layout->HasDriveHeader())
{
if (!partitionInSystemEncryptionScope)
continue;
if (!GetPath().IsDevice())
throw PartitionDeviceRequired (SRC_POS);
File driveDevice;
driveDevice.Open (DevicePath (wstring (GetPath())).ToHostDriveOfPartition());
int headerOffset = layout->GetHeaderOffset();
if (headerOffset >= 0)
driveDevice.SeekAt (headerOffset);
else
driveDevice.SeekEnd (headerOffset);
if (driveDevice.Read (headerBuffer) != layout->GetHeaderSize())
continue;
}
else
{
if (partitionInSystemEncryptionScope)
continue;
int headerOffset = useBackupHeaders ? layout->GetBackupHeaderOffset() : layout->GetHeaderOffset();
if (headerOffset >= 0)
VolumeFile->SeekAt (headerOffset);
else
VolumeFile->SeekEnd (headerOffset);
if (VolumeFile->Read (headerBuffer) != layout->GetHeaderSize())
continue;
}
EncryptionAlgorithmList layoutEncryptionAlgorithms = layout->GetSupportedEncryptionAlgorithms();
EncryptionModeList layoutEncryptionModes = layout->GetSupportedEncryptionModes();
if (typeid (*layout) == typeid (VolumeLayoutV2Normal))
{
skipLayoutV1Normal = true;
// Test all algorithms and modes of VolumeLayoutV1Normal as it shares header location with VolumeLayoutV2Normal
layoutEncryptionAlgorithms = EncryptionAlgorithm::GetAvailableAlgorithms();
layoutEncryptionModes = EncryptionMode::GetAvailableModes();
}
shared_ptr header = layout->GetHeader();
if (header->Decrypt (headerBuffer, *passwordKey, layout->GetSupportedKeyDerivationFunctions(), layoutEncryptionAlgorithms, layoutEncryptionModes))
{
// Header decrypted
if (typeid (*layout) == typeid (VolumeLayoutV2Normal) && header->GetRequiredMinProgramVersion() < 0x600)
{
// VolumeLayoutV1Normal has been opened as VolumeLayoutV2Normal
layout.reset (new VolumeLayoutV1Normal);
header->SetSize (layout->GetHeaderSize());
layout->SetHeader (header);
}
Type = layout->GetType();
SectorSize = header->GetSectorSize();
VolumeDataOffset = layout->GetDataOffset (VolumeHostSize);
VolumeDataSize = layout->GetDataSize (VolumeHostSize);
Header = header;
Layout = layout;
EA = header->GetEncryptionAlgorithm();
EncryptionMode &mode = *EA->GetMode();
if (layout->HasDriveHeader())
{
if (header->GetEncryptedAreaLength() != header->GetVolumeDataSize())
throw VolumeEncryptionNotCompleted (SRC_POS);
uint64 partitionStartOffset = VolumeFile->GetPartitionDeviceStartOffset();
if (partitionStartOffset < header->GetEncryptedAreaStart()
|| partitionStartOffset >= header->GetEncryptedAreaStart() + header->GetEncryptedAreaLength())
throw PasswordIncorrect (SRC_POS);
mode.SetSectorOffset (partitionStartOffset / ENCRYPTION_DATA_UNIT_SIZE);
}
else if (typeid (mode) == typeid (EncryptionModeLRW))
{
mode.SetSectorOffset (VolumeDataOffset / SectorSize);
}
// Volume protection
if (Protection == VolumeProtection::HiddenVolumeReadOnly)
{
if (Type == VolumeType::Hidden)
throw PasswordIncorrect (SRC_POS);
else
{
try
{
Volume protectedVolume;
protectedVolume.Open (VolumeFile,
protectionPassword, protectionKeyfiles,
VolumeProtection::ReadOnly,
shared_ptr (), shared_ptr (),
VolumeType::Hidden,
useBackupHeaders);
if (protectedVolume.GetType() != VolumeType::Hidden)
ParameterIncorrect (SRC_POS);
ProtectedRangeStart = protectedVolume.VolumeDataOffset;
ProtectedRangeEnd = protectedVolume.VolumeDataOffset + protectedVolume.VolumeDataSize;
if (typeid (*protectedVolume.Layout) == typeid (VolumeLayoutV1Hidden))
ProtectedRangeEnd += protectedVolume.Layout->GetHeaderSize();
}
catch (PasswordException&)
{
if (protectionKeyfiles && !protectionKeyfiles->empty())
throw ProtectionPasswordKeyfilesIncorrect (SRC_POS);
throw ProtectionPasswordIncorrect (SRC_POS);
}
}
}
return;
}
}
if (partitionInSystemEncryptionScope)
throw PasswordOrKeyboardLayoutIncorrect (SRC_POS);
if (!partitionInSystemEncryptionScope && GetPath().IsDevice())
{
// Check if the device contains GostCrypt Boot Loader
try
{
File driveDevice;
driveDevice.Open (DevicePath (wstring (GetPath())).ToHostDriveOfPartition());
Buffer mbr (VolumeFile->GetDeviceSectorSize());
driveDevice.ReadAt (mbr, 0);
// Search for the string "GostCrypt"
size_t nameLen = strlen (GST_APP_NAME);
for (size_t i = 0; i < mbr.Size() - nameLen; ++i)
{
if (memcmp (mbr.Ptr() + i, GST_APP_NAME, nameLen) == 0)
throw PasswordOrMountOptionsIncorrect (SRC_POS);
}
}
catch (PasswordOrMountOptionsIncorrect&) { throw; }
catch (...) { }
}
if (keyfiles && !keyfiles->empty())
throw PasswordKeyfilesIncorrect (SRC_POS);
throw PasswordIncorrect (SRC_POS);
}
catch (...)
{
Close();
throw;
}
}
void Volume::ReadSectors (const BufferPtr &buffer, uint64 byteOffset)
{
if_debug (ValidateState ());
uint64 length = buffer.Size();
uint64 hostOffset = VolumeDataOffset + byteOffset;
if (length % SectorSize != 0 || byteOffset % SectorSize != 0)
throw ParameterIncorrect (SRC_POS);
if (VolumeFile->ReadAt (buffer, hostOffset) != length)
throw MissingVolumeData (SRC_POS);
EA->DecryptSectors (buffer, hostOffset / SectorSize, length / SectorSize, SectorSize);
TotalDataRead += length;
}
void Volume::ReEncryptHeader (bool backupHeader, const ConstBufferPtr &newSalt, const ConstBufferPtr &newHeaderKey, shared_ptr newPkcs5Kdf)
{
if_debug (ValidateState ());
if (Protection == VolumeProtection::ReadOnly)
throw VolumeReadOnly (SRC_POS);
SecureBuffer newHeaderBuffer (Layout->GetHeaderSize());
Header->EncryptNew (newHeaderBuffer, newSalt, newHeaderKey, newPkcs5Kdf);
int headerOffset = backupHeader ? Layout->GetBackupHeaderOffset() : Layout->GetHeaderOffset();
if (headerOffset >= 0)
VolumeFile->SeekAt (headerOffset);
else
VolumeFile->SeekEnd (headerOffset);
VolumeFile->Write (newHeaderBuffer);
}
void Volume::ValidateState () const
{
if (VolumeFile.get() == nullptr)
throw NotInitialized (SRC_POS);
}
void Volume::WriteSectors (const ConstBufferPtr &buffer, uint64 byteOffset)
{
if_debug (ValidateState ());
uint64 length = buffer.Size();
uint64 hostOffset = VolumeDataOffset + byteOffset;
if (length % SectorSize != 0
|| byteOffset % SectorSize != 0
|| byteOffset + length > VolumeDataSize)
throw ParameterIncorrect (SRC_POS);
if (Protection == VolumeProtection::ReadOnly)
throw VolumeReadOnly (SRC_POS);
if (HiddenVolumeProtectionTriggered)
throw VolumeProtected (SRC_POS);
if (Protection == VolumeProtection::HiddenVolumeReadOnly)
CheckProtectedRange (hostOffset, length);
SecureBuffer encBuf (buffer.Size());
encBuf.CopyFrom (buffer);
EA->EncryptSectors (encBuf, hostOffset / SectorSize, length / SectorSize, SectorSize);
VolumeFile->WriteAt (encBuf, hostOffset);
TotalDataWritten += length;
uint64 writeEndOffset = byteOffset + buffer.Size();
if (writeEndOffset > TopWriteOffset)
TopWriteOffset = writeEndOffset;
}
}
GostCrypt_MacOSX_1.0/Volume/._Volume.h 000755 000765 000024 00000000261 12361324353 017606 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/Volume.h 000755 000765 000024 00000011723 12361324353 017376 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Volume_Volume
#define GST_HEADER_Volume_Volume
#include "Platform/Platform.h"
#include "Platform/StringConverter.h"
#include "EncryptionAlgorithm.h"
#include "EncryptionMode.h"
#include "Keyfile.h"
#include "VolumePassword.h"
#include "VolumeException.h"
#include "VolumeLayout.h"
namespace GostCrypt
{
class VolumePath
{
public:
VolumePath () { }
VolumePath (const wstring &path) { Data = path; }
VolumePath (const FilesystemPath &path) { Data = path; }
bool operator== (const VolumePath &other) const { return Data == other.Data; }
bool operator!= (const VolumePath &other) const { return Data != other.Data; }
operator FilesystemPath () const { return FilesystemPath (Data); }
operator string () const { return StringConverter::ToSingle (Data); }
operator wstring () const { return Data; }
bool IsDevice () const { return FilesystemPath (Data).IsBlockDevice() || FilesystemPath (Data).IsCharacterDevice(); }
bool IsEmpty () const { return Data.empty(); }
protected:
wstring Data;
};
typedef list VolumePathList;
struct VolumeHostType
{
enum Enum
{
Unknown,
File,
Device
};
};
struct VolumeProtection
{
enum Enum
{
None,
ReadOnly,
HiddenVolumeReadOnly
};
};
class Volume
{
public:
Volume ();
virtual ~Volume ();
void Close ();
shared_ptr GetEncryptionAlgorithm () const;
shared_ptr GetEncryptionMode () const;
shared_ptr GetFile () const { return VolumeFile; }
shared_ptr GetHeader () const { return Header; }
uint64 GetHeaderCreationTime () const { return Header->GetHeaderCreationTime(); }
uint64 GetHostSize () const { return VolumeHostSize; }
shared_ptr GetLayout () const { return Layout; }
VolumePath GetPath () const { return VolumeFile->GetPath(); }
VolumeProtection::Enum GetProtectionType () const { return Protection; }
shared_ptr GetPkcs5Kdf () const { return Header->GetPkcs5Kdf(); }
uint32 GetSaltSize () const { return Header->GetSaltSize(); }
size_t GetSectorSize () const { return SectorSize; }
uint64 GetSize () const { return VolumeDataSize; }
uint64 GetTopWriteOffset () const { return TopWriteOffset; }
uint64 GetTotalDataRead () const { return TotalDataRead; }
uint64 GetTotalDataWritten () const { return TotalDataWritten; }
VolumeType::Enum GetType () const { return Type; }
uint64 GetVolumeCreationTime () const { return Header->GetVolumeCreationTime(); }
bool IsHiddenVolumeProtectionTriggered () const { return HiddenVolumeProtectionTriggered; }
bool IsInSystemEncryptionScope () const { return SystemEncryption; }
void Open (const VolumePath &volumePath, bool preserveTimestamps, shared_ptr password, shared_ptr keyfiles, VolumeProtection::Enum protection = VolumeProtection::None, shared_ptr protectionPassword = shared_ptr (), shared_ptr protectionKeyfiles = shared_ptr (), bool sharedAccessAllowed = false, VolumeType::Enum volumeType = VolumeType::Unknown, bool useBackupHeaders = false, bool partitionInSystemEncryptionScope = false);
void Open (shared_ptr volumeFile, shared_ptr password, shared_ptr keyfiles, VolumeProtection::Enum protection = VolumeProtection::None, shared_ptr protectionPassword = shared_ptr (), shared_ptr protectionKeyfiles = shared_ptr (), VolumeType::Enum volumeType = VolumeType::Unknown, bool useBackupHeaders = false, bool partitionInSystemEncryptionScope = false);
void ReadSectors (const BufferPtr &buffer, uint64 byteOffset);
void ReEncryptHeader (bool backupHeader, const ConstBufferPtr &newSalt, const ConstBufferPtr &newHeaderKey, shared_ptr newPkcs5Kdf);
void WriteSectors (const ConstBufferPtr &buffer, uint64 byteOffset);
protected:
void CheckProtectedRange (uint64 writeHostOffset, uint64 writeLength);
void ValidateState () const;
shared_ptr EA;
shared_ptr Header;
bool HiddenVolumeProtectionTriggered;
shared_ptr Layout;
uint64 ProtectedRangeStart;
uint64 ProtectedRangeEnd;
VolumeProtection::Enum Protection;
size_t SectorSize;
bool SystemEncryption;
VolumeType::Enum Type;
shared_ptr VolumeFile;
uint64 VolumeHostSize;
uint64 VolumeDataOffset;
uint64 VolumeDataSize;
uint64 TopWriteOffset;
uint64 TotalDataRead;
uint64 TotalDataWritten;
private:
Volume (const Volume &);
Volume &operator= (const Volume &);
};
}
#endif // GST_HEADER_Volume_Volume
GostCrypt_MacOSX_1.0/Volume/._Volume.make 000755 000765 000024 00000000261 12361324353 020274 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/Volume.make 000755 000765 000024 00000002042 12361324353 020056 0 ustar 00cvo staff 000000 000000 #
# Copyright (c) 2008-2010 TrueCrypt Developers Association. All rights reserved.
#
# Governed by the TrueCrypt License 3.0 the full text of which is contained in
# the file License.txt included in TrueCrypt binary and source code distribution
# packages.
#
OBJS :=
OBJS += Cipher.o
OBJS += EncryptionAlgorithm.o
OBJS += EncryptionMode.o
OBJS += EncryptionModeCBC.o
OBJS += EncryptionModeLRW.o
OBJS += EncryptionModeXTS.o
OBJS += EncryptionTest.o
OBJS += EncryptionThreadPool.o
OBJS += Hash.o
OBJS += Keyfile.o
OBJS += Pkcs5Kdf.o
OBJS += Volume.o
OBJS += VolumeException.o
OBJS += VolumeHeader.o
OBJS += VolumeInfo.o
OBJS += VolumeLayout.o
OBJS += VolumePassword.o
OBJS += VolumePasswordCache.o
OBJS += ../Crypto/Whirlpool.o
OBJS += ../Crypto/Stribog.o
OBJS += ../Crypto/GostCipher.o
OBJS += ../Crypto/GostHash.o
OBJS += ../Common/Crc.o
OBJS += ../Common/Endian.o
OBJS += ../Common/GfMul.o
OBJS += ../Common/Pkcs5.o
OBJS += ../Common/SecurityToken.o
VolumeLibrary: Volume.a
include $(BUILD_INC)/Makefile.inc
GostCrypt_MacOSX_1.0/Volume/._VolumeException.cpp 000755 000765 000024 00000000261 12361324353 022020 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/VolumeException.cpp 000755 000765 000024 00000001642 12361324353 021607 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "VolumeException.h"
#include "Platform/SerializerFactory.h"
namespace GostCrypt
{
// Do not inline the constructors to ensure this module is not optimized away
VolumeException::VolumeException ()
{
}
VolumeException::VolumeException (const string &message) : Exception (message)
{
}
VolumeException::VolumeException (const string &message, const wstring &subject) : Exception (message, subject)
{
}
#define GST_EXCEPTION(TYPE) GST_SERIALIZER_FACTORY_ADD(TYPE)
#undef GST_EXCEPTION_NODECL
#define GST_EXCEPTION_NODECL(TYPE) GST_SERIALIZER_FACTORY_ADD(TYPE)
GST_SERIALIZER_FACTORY_ADD_EXCEPTION_SET (VolumeException);
}
GostCrypt_MacOSX_1.0/Volume/._VolumeException.h 000755 000765 000024 00000000261 12361324353 021465 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/VolumeException.h 000755 000765 000024 00000002264 12361324353 021255 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008-2010 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Volume_VolumeExceptions
#define GST_HEADER_Volume_VolumeExceptions
#include "Platform/Platform.h"
namespace GostCrypt
{
struct VolumeException : public Exception
{
protected:
VolumeException ();
VolumeException (const string &message);
VolumeException (const string &message, const wstring &subject);
};
#define GST_EXCEPTION(NAME) GST_EXCEPTION_DECL(NAME,VolumeException)
#undef GST_EXCEPTION_SET
#define GST_EXCEPTION_SET \
GST_EXCEPTION (HigherVersionRequired); \
GST_EXCEPTION (KeyfilePathEmpty); \
GST_EXCEPTION (MissingVolumeData); \
GST_EXCEPTION (MountedVolumeInUse); \
GST_EXCEPTION (UnsupportedSectorSize); \
GST_EXCEPTION (VolumeEncryptionNotCompleted); \
GST_EXCEPTION (VolumeHostInUse); \
GST_EXCEPTION (VolumeProtected); \
GST_EXCEPTION (VolumeReadOnly);
GST_EXCEPTION_SET;
#undef GST_EXCEPTION
}
#endif // GST_HEADER_Volume_VolumeExceptions
GostCrypt_MacOSX_1.0/Volume/._VolumeHeader.cpp 000755 000765 000024 00000000261 12361324353 021252 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/VolumeHeader.cpp 000755 000765 000024 00000024706 12361324353 021047 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008-2010 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "Crc32.h"
#include "EncryptionModeXTS.h"
#include "Pkcs5Kdf.h"
#include "Pkcs5Kdf.h"
#include "VolumeHeader.h"
#include "VolumeException.h"
#include "Common/Crypto.h"
namespace GostCrypt
{
VolumeHeader::VolumeHeader (uint32 size)
{
Init();
HeaderSize = size;
EncryptedHeaderDataSize = size - EncryptedHeaderDataOffset;
}
VolumeHeader::~VolumeHeader ()
{
Init();
}
void VolumeHeader::Init ()
{
VolumeKeyAreaCrc32 = 0;
VolumeCreationTime = 0;
HeaderCreationTime = 0;
mVolumeType = VolumeType::Unknown;
HiddenVolumeDataSize = 0;
VolumeDataSize = 0;
EncryptedAreaStart = 0;
EncryptedAreaLength = 0;
Flags = 0;
SectorSize = 0;
}
void VolumeHeader::Create (const BufferPtr &headerBuffer, VolumeHeaderCreationOptions &options)
{
if (options.DataKey.Size() != options.EA->GetKeySize() * 2 || options.Salt.Size() != GetSaltSize())
throw ParameterIncorrect (SRC_POS);
headerBuffer.Zero();
HeaderVersion = CurrentHeaderVersion;
RequiredMinProgramVersion = CurrentRequiredMinProgramVersion;
DataAreaKey.Zero();
DataAreaKey.CopyFrom (options.DataKey);
VolumeCreationTime = 0;
HiddenVolumeDataSize = (options.Type == VolumeType::Hidden ? options.VolumeDataSize : 0);
VolumeDataSize = options.VolumeDataSize;
EncryptedAreaStart = options.VolumeDataStart;
EncryptedAreaLength = options.VolumeDataSize;
SectorSize = options.SectorSize;
if (SectorSize < GST_MIN_VOLUME_SECTOR_SIZE
|| SectorSize > GST_MAX_VOLUME_SECTOR_SIZE
|| SectorSize % ENCRYPTION_DATA_UNIT_SIZE != 0)
{
throw ParameterIncorrect (SRC_POS);
}
EA = options.EA;
shared_ptr mode (new EncryptionModeXTS ());
EA->SetMode (mode);
EncryptNew (headerBuffer, options.Salt, options.HeaderKey, options.Kdf);
}
bool VolumeHeader::Decrypt (const ConstBufferPtr &encryptedData, const VolumePassword &password, const Pkcs5KdfList &keyDerivationFunctions, const EncryptionAlgorithmList &encryptionAlgorithms, const EncryptionModeList &encryptionModes)
{
if (password.Size() < 1)
throw PasswordEmpty (SRC_POS);
ConstBufferPtr salt (encryptedData.GetRange (SaltOffset, SaltSize));
SecureBuffer header (EncryptedHeaderDataSize);
SecureBuffer headerKey (GetLargestSerializedKeySize());
foreach (shared_ptr pkcs5, keyDerivationFunctions)
{
pkcs5->DeriveKey (headerKey, password, salt);
foreach (shared_ptr mode, encryptionModes)
{
if (typeid (*mode) != typeid (EncryptionModeXTS))
mode->SetKey (headerKey.GetRange (0, mode->GetKeySize()));
foreach (shared_ptr ea, encryptionAlgorithms)
{
if (!ea->IsModeSupported (mode))
continue;
if (typeid (*mode) == typeid (EncryptionModeXTS))
{
ea->SetKey (headerKey.GetRange (0, ea->GetKeySize()));
mode = mode->GetNew();
mode->SetKey (headerKey.GetRange (ea->GetKeySize(), ea->GetKeySize()));
}
else
{
ea->SetKey (headerKey.GetRange (LegacyEncryptionModeKeyAreaSize, ea->GetKeySize()));
}
ea->SetMode (mode);
header.CopyFrom (encryptedData.GetRange (EncryptedHeaderDataOffset, EncryptedHeaderDataSize));
ea->Decrypt (header);
if (Deserialize (header, ea, mode))
{
EA = ea;
Pkcs5 = pkcs5;
return true;
}
}
}
}
return false;
}
bool VolumeHeader::Deserialize (const ConstBufferPtr &header, shared_ptr &ea, shared_ptr &mode)
{
if (header.Size() != EncryptedHeaderDataSize)
throw ParameterIncorrect (SRC_POS);
if (header[0] != 'T' ||
header[1] != 'R' ||
header[2] != 'U' ||
header[3] != 'E')
return false;
size_t offset = 4;
HeaderVersion = DeserializeEntry (header, offset);
if (HeaderVersion < MinAllowedHeaderVersion)
return false;
if (HeaderVersion > CurrentHeaderVersion)
throw HigherVersionRequired (SRC_POS);
if (HeaderVersion >= 4
&& Crc32::ProcessBuffer (header.GetRange (0, GST_HEADER_OFFSET_HEADER_CRC - GST_HEADER_OFFSET_MAGIC))
!= DeserializeEntryAt (header, GST_HEADER_OFFSET_HEADER_CRC - GST_HEADER_OFFSET_MAGIC))
{
return false;
}
RequiredMinProgramVersion = DeserializeEntry (header, offset);
if (RequiredMinProgramVersion > Version::Number())
throw HigherVersionRequired (SRC_POS);
VolumeKeyAreaCrc32 = DeserializeEntry (header, offset);
VolumeCreationTime = DeserializeEntry (header, offset);
HeaderCreationTime = DeserializeEntry (header, offset);
HiddenVolumeDataSize = DeserializeEntry (header, offset);
mVolumeType = (HiddenVolumeDataSize != 0 ? VolumeType::Hidden : VolumeType::Normal);
VolumeDataSize = DeserializeEntry (header, offset);
EncryptedAreaStart = DeserializeEntry (header, offset);
EncryptedAreaLength = DeserializeEntry (header, offset);
Flags = DeserializeEntry (header, offset);
SectorSize = DeserializeEntry (header, offset);
if (HeaderVersion < 5)
SectorSize = GST_SECTOR_SIZE_LEGACY;
if (SectorSize < GST_MIN_VOLUME_SECTOR_SIZE
|| SectorSize > GST_MAX_VOLUME_SECTOR_SIZE
|| SectorSize % ENCRYPTION_DATA_UNIT_SIZE != 0)
{
throw ParameterIncorrect (SRC_POS);
}
#if !(defined (GST_WINDOWS) || defined (GST_LINUX))
if (SectorSize != GST_SECTOR_SIZE_LEGACY)
throw UnsupportedSectorSize (SRC_POS);
#endif
offset = DataAreaKeyOffset;
if (VolumeKeyAreaCrc32 != Crc32::ProcessBuffer (header.GetRange (offset, DataKeyAreaMaxSize)))
return false;
DataAreaKey.CopyFrom (header.GetRange (offset, DataKeyAreaMaxSize));
ea = ea->GetNew();
mode = mode->GetNew();
if (typeid (*mode) == typeid (EncryptionModeXTS))
{
ea->SetKey (header.GetRange (offset, ea->GetKeySize()));
mode->SetKey (header.GetRange (offset + ea->GetKeySize(), ea->GetKeySize()));
}
else
{
mode->SetKey (header.GetRange (offset, mode->GetKeySize()));
ea->SetKey (header.GetRange (offset + LegacyEncryptionModeKeyAreaSize, ea->GetKeySize()));
}
ea->SetMode (mode);
return true;
}
template
T VolumeHeader::DeserializeEntry (const ConstBufferPtr &header, size_t &offset) const
{
offset += sizeof (T);
if (offset > header.Size())
throw ParameterIncorrect (SRC_POS);
return Endian::Big (*reinterpret_cast (header.Get() + offset - sizeof (T)));
}
template
T VolumeHeader::DeserializeEntryAt (const ConstBufferPtr &header, const size_t &offset) const
{
if (offset > header.Size())
throw ParameterIncorrect (SRC_POS);
return Endian::Big (*reinterpret_cast (header.Get() + offset));
}
void VolumeHeader::EncryptNew (const BufferPtr &newHeaderBuffer, const ConstBufferPtr &newSalt, const ConstBufferPtr &newHeaderKey, shared_ptr newPkcs5Kdf)
{
if (newHeaderBuffer.Size() != HeaderSize || newSalt.Size() != SaltSize)
throw ParameterIncorrect (SRC_POS);
shared_ptr mode = EA->GetMode()->GetNew();
shared_ptr ea = EA->GetNew();
if (typeid (*mode) == typeid (EncryptionModeXTS))
{
mode->SetKey (newHeaderKey.GetRange (EA->GetKeySize(), EA->GetKeySize()));
ea->SetKey (newHeaderKey.GetRange (0, ea->GetKeySize()));
}
else
{
mode->SetKey (newHeaderKey.GetRange (0, mode->GetKeySize()));
ea->SetKey (newHeaderKey.GetRange (LegacyEncryptionModeKeyAreaSize, ea->GetKeySize()));
}
ea->SetMode (mode);
newHeaderBuffer.CopyFrom (newSalt);
BufferPtr headerData = newHeaderBuffer.GetRange (EncryptedHeaderDataOffset, EncryptedHeaderDataSize);
Serialize (headerData);
ea->Encrypt (headerData);
if (newPkcs5Kdf)
Pkcs5 = newPkcs5Kdf;
}
size_t VolumeHeader::GetLargestSerializedKeySize ()
{
size_t largestKey = EncryptionAlgorithm::GetLargestKeySize (EncryptionAlgorithm::GetAvailableAlgorithms());
// XTS mode requires the same key size as the encryption algorithm.
// Legacy modes may require larger key than XTS.
if (LegacyEncryptionModeKeyAreaSize + largestKey > largestKey * 2)
return LegacyEncryptionModeKeyAreaSize + largestKey;
return largestKey * 2;
}
void VolumeHeader::Serialize (const BufferPtr &header) const
{
if (header.Size() != EncryptedHeaderDataSize)
throw ParameterIncorrect (SRC_POS);
header.Zero();
header[0] = 'T';
header[1] = 'R';
header[2] = 'U';
header[3] = 'E';
size_t offset = 4;
header.GetRange (DataAreaKeyOffset, DataAreaKey.Size()).CopyFrom (DataAreaKey);
uint16 headerVersion = CurrentHeaderVersion;
SerializeEntry (headerVersion, header, offset);
SerializeEntry (RequiredMinProgramVersion, header, offset);
SerializeEntry (Crc32::ProcessBuffer (header.GetRange (DataAreaKeyOffset, DataKeyAreaMaxSize)), header, offset);
uint64 reserved64 = 0;
SerializeEntry (reserved64, header, offset);
SerializeEntry (reserved64, header, offset);
SerializeEntry (HiddenVolumeDataSize, header, offset);
SerializeEntry (VolumeDataSize, header, offset);
SerializeEntry (EncryptedAreaStart, header, offset);
SerializeEntry (EncryptedAreaLength, header, offset);
SerializeEntry (Flags, header, offset);
if (SectorSize < GST_MIN_VOLUME_SECTOR_SIZE
|| SectorSize > GST_MAX_VOLUME_SECTOR_SIZE
|| SectorSize % ENCRYPTION_DATA_UNIT_SIZE != 0)
{
throw ParameterIncorrect (SRC_POS);
}
SerializeEntry (SectorSize, header, offset);
offset = GST_HEADER_OFFSET_HEADER_CRC - GST_HEADER_OFFSET_MAGIC;
SerializeEntry (Crc32::ProcessBuffer (header.GetRange (0, GST_HEADER_OFFSET_HEADER_CRC - GST_HEADER_OFFSET_MAGIC)), header, offset);
}
template
void VolumeHeader::SerializeEntry (const T &entry, const BufferPtr &header, size_t &offset) const
{
offset += sizeof (T);
if (offset > header.Size())
throw ParameterIncorrect (SRC_POS);
*reinterpret_cast (header.Get() + offset - sizeof (T)) = Endian::Big (entry);
}
void VolumeHeader::SetSize (uint32 headerSize)
{
HeaderSize = headerSize;
EncryptedHeaderDataSize = HeaderSize - EncryptedHeaderDataOffset;
}
}
GostCrypt_MacOSX_1.0/Volume/._VolumeHeader.h 000755 000765 000024 00000000261 12361324353 020717 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/VolumeHeader.h 000755 000765 000024 00000010464 12361324353 020510 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008-2010 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Volume_VolumeHeader
#define GST_HEADER_Volume_VolumeHeader
#include "Common/Gstdefs.h"
#include "Common/Volumes.h"
#include "Platform/Platform.h"
#include "Volume/EncryptionAlgorithm.h"
#include "Volume/EncryptionMode.h"
#include "Volume/Keyfile.h"
#include "Volume/VolumePassword.h"
#include "Volume/Pkcs5Kdf.h"
#include "Version.h"
// For specifications of the volume header see Common/Volumes.c
namespace GostCrypt
{
typedef uint64 VolumeTime;
struct VolumeType
{
enum Enum
{
Unknown,
Normal,
Hidden
};
};
struct VolumeHeaderCreationOptions
{
ConstBufferPtr DataKey;
shared_ptr EA;
shared_ptr Kdf;
ConstBufferPtr HeaderKey;
ConstBufferPtr Salt;
uint32 SectorSize;
uint64 VolumeDataSize;
uint64 VolumeDataStart;
VolumeType::Enum Type;
};
class VolumeHeader
{
public:
VolumeHeader (uint32 HeaderSize);
virtual ~VolumeHeader ();
void Create (const BufferPtr &headerBuffer, VolumeHeaderCreationOptions &options);
bool Decrypt (const ConstBufferPtr &encryptedData, const VolumePassword &password, const Pkcs5KdfList &keyDerivationFunctions, const EncryptionAlgorithmList &encryptionAlgorithms, const EncryptionModeList &encryptionModes);
void EncryptNew (const BufferPtr &newHeaderBuffer, const ConstBufferPtr &newSalt, const ConstBufferPtr &newHeaderKey, shared_ptr newPkcs5Kdf);
uint64 GetEncryptedAreaStart () const { return EncryptedAreaStart; }
uint64 GetEncryptedAreaLength () const { return EncryptedAreaLength; }
shared_ptr GetEncryptionAlgorithm () const { return EA; }
uint32 GetFlags () const { return Flags; }
VolumeTime GetHeaderCreationTime () const { return HeaderCreationTime; }
uint64 GetHiddenVolumeDataSize () const { return HiddenVolumeDataSize; }
static size_t GetLargestSerializedKeySize ();
shared_ptr GetPkcs5Kdf () const { return Pkcs5; }
uint16 GetRequiredMinProgramVersion () const { return RequiredMinProgramVersion; }
size_t GetSectorSize () const { return SectorSize; }
static uint32 GetSaltSize () { return SaltSize; }
uint64 GetVolumeDataSize () const { return VolumeDataSize; }
VolumeTime GetVolumeCreationTime () const { return VolumeCreationTime; }
void SetSize (uint32 headerSize);
protected:
bool Deserialize (const ConstBufferPtr &header, shared_ptr &ea, shared_ptr &mode);
template T DeserializeEntry (const ConstBufferPtr &header, size_t &offset) const;
template T DeserializeEntryAt (const ConstBufferPtr &header, const size_t &offset) const;
void Init ();
void Serialize (const BufferPtr &header) const;
template void SerializeEntry (const T &entry, const BufferPtr &header, size_t &offset) const;
uint32 HeaderSize;
static const uint16 CurrentHeaderVersion = VOLUME_HEADER_VERSION;
static const uint16 CurrentRequiredMinProgramVersion = GST_VOLUME_MIN_REQUIRED_PROGRAM_VERSION;
static const uint16 MinAllowedHeaderVersion = 1;
static const int SaltOffset = 0;
static const uint32 SaltSize = 64;
static const int EncryptedHeaderDataOffset = SaltOffset + SaltSize;
uint32 EncryptedHeaderDataSize;
static const uint32 LegacyEncryptionModeKeyAreaSize = 32;
static const int DataKeyAreaMaxSize = 256;
static const uint32 DataAreaKeyOffset = DataKeyAreaMaxSize - EncryptedHeaderDataOffset;
shared_ptr EA;
shared_ptr Pkcs5;
uint16 HeaderVersion;
uint16 RequiredMinProgramVersion;
uint32 VolumeKeyAreaCrc32;
VolumeTime VolumeCreationTime;
VolumeTime HeaderCreationTime;
VolumeType::Enum mVolumeType;
uint64 HiddenVolumeDataSize;
uint64 VolumeDataSize;
uint64 EncryptedAreaStart;
uint64 EncryptedAreaLength;
uint32 Flags;
uint32 SectorSize;
SecureBuffer DataAreaKey;
private:
VolumeHeader (const VolumeHeader &);
VolumeHeader &operator= (const VolumeHeader &);
};
}
#endif // GST_HEADER_Volume_VolumeHeader
GostCrypt_MacOSX_1.0/Volume/._VolumeInfo.cpp 000755 000765 000024 00000000261 12361324353 020755 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/VolumeInfo.cpp 000755 000765 000024 00000012550 12361324353 020544 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "Common/Gstdefs.h"
#include "VolumeInfo.h"
#include "Platform/SerializerFactory.h"
namespace GostCrypt
{
void VolumeInfo::Deserialize (shared_ptr stream)
{
Serializer sr (stream);
sr.Deserialize ("ProgramVersion", ProgramVersion);
AuxMountPoint = sr.DeserializeWString ("AuxMountPoint");
sr.Deserialize ("EncryptionAlgorithmBlockSize", EncryptionAlgorithmBlockSize);
sr.Deserialize ("EncryptionAlgorithmKeySize", EncryptionAlgorithmKeySize);
sr.Deserialize ("EncryptionAlgorithmMinBlockSize", EncryptionAlgorithmMinBlockSize);
EncryptionAlgorithmName = sr.DeserializeWString ("EncryptionAlgorithmName");
EncryptionModeName = sr.DeserializeWString ("EncryptionModeName");
sr.Deserialize ("HeaderCreationTime", HeaderCreationTime);
sr.Deserialize ("HiddenVolumeProtectionTriggered", HiddenVolumeProtectionTriggered);
LoopDevice = sr.DeserializeWString ("LoopDevice");
if (ProgramVersion >= 0x600)
sr.Deserialize ("MinRequiredProgramVersion", MinRequiredProgramVersion);
MountPoint = sr.DeserializeWString ("MountPoint");
Path = sr.DeserializeWString ("Path");
sr.Deserialize ("Pkcs5IterationCount", Pkcs5IterationCount);
Pkcs5PrfName = sr.DeserializeWString ("Pkcs5PrfName");
Protection = static_cast (sr.DeserializeInt32 ("Protection"));
sr.Deserialize ("SerialInstanceNumber", SerialInstanceNumber);
sr.Deserialize ("Size", Size);
sr.Deserialize ("SlotNumber", SlotNumber);
if (ProgramVersion >= 0x620)
sr.Deserialize ("SystemEncryption", SystemEncryption);
if (ProgramVersion >= 0x600)
sr.Deserialize ("TopWriteOffset", TopWriteOffset);
sr.Deserialize ("TotalDataRead", TotalDataRead);
sr.Deserialize ("TotalDataWritten", TotalDataWritten);
Type = static_cast (sr.DeserializeInt32 ("Type"));
VirtualDevice = sr.DeserializeWString ("VirtualDevice");
sr.Deserialize ("VolumeCreationTime", VolumeCreationTime);
}
bool VolumeInfo::FirstVolumeMountedAfterSecond (shared_ptr first, shared_ptr second)
{
return first->SerialInstanceNumber > second->SerialInstanceNumber;
}
void VolumeInfo::Serialize (shared_ptr stream) const
{
Serializable::Serialize (stream);
Serializer sr (stream);
const uint32 version = VERSION_NUM;
sr.Serialize ("ProgramVersion", version);
sr.Serialize ("AuxMountPoint", wstring (AuxMountPoint));
sr.Serialize ("EncryptionAlgorithmBlockSize", EncryptionAlgorithmBlockSize);
sr.Serialize ("EncryptionAlgorithmKeySize", EncryptionAlgorithmKeySize);
sr.Serialize ("EncryptionAlgorithmMinBlockSize", EncryptionAlgorithmMinBlockSize);
sr.Serialize ("EncryptionAlgorithmName", EncryptionAlgorithmName);
sr.Serialize ("EncryptionModeName", EncryptionModeName);
sr.Serialize ("HeaderCreationTime", HeaderCreationTime);
sr.Serialize ("HiddenVolumeProtectionTriggered", HiddenVolumeProtectionTriggered);
sr.Serialize ("LoopDevice", wstring (LoopDevice));
sr.Serialize ("MinRequiredProgramVersion", MinRequiredProgramVersion);
sr.Serialize ("MountPoint", wstring (MountPoint));
sr.Serialize ("Path", wstring (Path));
sr.Serialize ("Pkcs5IterationCount", Pkcs5IterationCount);
sr.Serialize ("Pkcs5PrfName", Pkcs5PrfName);
sr.Serialize ("Protection", static_cast (Protection));
sr.Serialize ("SerialInstanceNumber", SerialInstanceNumber);
sr.Serialize ("Size", Size);
sr.Serialize ("SlotNumber", SlotNumber);
sr.Serialize ("SystemEncryption", SystemEncryption);
sr.Serialize ("TopWriteOffset", TopWriteOffset);
sr.Serialize ("TotalDataRead", TotalDataRead);
sr.Serialize ("TotalDataWritten", TotalDataWritten);
sr.Serialize ("Type", static_cast (Type));
sr.Serialize ("VirtualDevice", wstring (VirtualDevice));
sr.Serialize ("VolumeCreationTime", VolumeCreationTime);
}
void VolumeInfo::Set (const Volume &volume)
{
EncryptionAlgorithmBlockSize = static_cast (volume.GetEncryptionAlgorithm()->GetMaxBlockSize());
EncryptionAlgorithmKeySize = static_cast (volume.GetEncryptionAlgorithm()->GetKeySize());
EncryptionAlgorithmMinBlockSize = static_cast (volume.GetEncryptionAlgorithm()->GetMinBlockSize());
EncryptionAlgorithmName = volume.GetEncryptionAlgorithm()->GetName();
EncryptionModeName = volume.GetEncryptionMode()->GetName();
HeaderCreationTime = volume.GetHeaderCreationTime();
VolumeCreationTime = volume.GetVolumeCreationTime();
HiddenVolumeProtectionTriggered = volume.IsHiddenVolumeProtectionTriggered();
MinRequiredProgramVersion = volume.GetHeader()->GetRequiredMinProgramVersion();
Path = volume.GetPath();
Pkcs5IterationCount = volume.GetPkcs5Kdf()->GetIterationCount();
Pkcs5PrfName = volume.GetPkcs5Kdf()->GetName();
Protection = volume.GetProtectionType();
Size = volume.GetSize();
SystemEncryption = volume.IsInSystemEncryptionScope();
Type = volume.GetType();
TopWriteOffset = volume.GetTopWriteOffset();
TotalDataRead = volume.GetTotalDataRead();
TotalDataWritten = volume.GetTotalDataWritten();
}
GST_SERIALIZER_FACTORY_ADD_CLASS (VolumeInfo);
}
GostCrypt_MacOSX_1.0/Volume/._VolumeInfo.h 000755 000765 000024 00000000261 12361324353 020422 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/VolumeInfo.h 000755 000765 000024 00000003555 12361324353 020216 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Volume_VolumeInfo
#define GST_HEADER_Volume_VolumeInfo
#include "Platform/Platform.h"
#include "Platform/Serializable.h"
#include "Volume/Volume.h"
#include "Volume/VolumeSlot.h"
namespace GostCrypt
{
class VolumeInfo;
typedef list < shared_ptr > VolumeInfoList;
class VolumeInfo : public Serializable
{
public:
VolumeInfo () { }
virtual ~VolumeInfo () { }
GST_SERIALIZABLE (VolumeInfo);
static bool FirstVolumeMountedAfterSecond (shared_ptr first, shared_ptr second);
void Set (const Volume &volume);
// Modifying this structure can introduce incompatibility with previous versions
DirectoryPath AuxMountPoint;
uint32 EncryptionAlgorithmBlockSize;
uint32 EncryptionAlgorithmKeySize;
uint32 EncryptionAlgorithmMinBlockSize;
wstring EncryptionAlgorithmName;
wstring EncryptionModeName;
VolumeTime HeaderCreationTime;
bool HiddenVolumeProtectionTriggered;
DevicePath LoopDevice;
uint32 MinRequiredProgramVersion;
DirectoryPath MountPoint;
VolumePath Path;
uint32 Pkcs5IterationCount;
wstring Pkcs5PrfName;
uint32 ProgramVersion;
VolumeProtection::Enum Protection;
uint64 SerialInstanceNumber;
uint64 Size;
VolumeSlotNumber SlotNumber;
bool SystemEncryption;
uint64 TopWriteOffset;
uint64 TotalDataRead;
uint64 TotalDataWritten;
VolumeType::Enum Type;
DevicePath VirtualDevice;
VolumeTime VolumeCreationTime;
private:
VolumeInfo (const VolumeInfo &);
VolumeInfo &operator= (const VolumeInfo &);
};
}
#endif // GST_HEADER_Volume_VolumeInfo
GostCrypt_MacOSX_1.0/Volume/._VolumeLayout.cpp 000755 000765 000024 00000000261 12361324353 021337 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/VolumeLayout.cpp 000755 000765 000024 00000014034 12361324353 021125 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "Volume/EncryptionMode.h"
#include "Volume/EncryptionModeCBC.h"
#include "Volume/EncryptionModeLRW.h"
#include "Volume/EncryptionModeXTS.h"
#include "VolumeLayout.h"
#include "Boot/Windows/BootCommon.h"
namespace GostCrypt
{
VolumeLayout::VolumeLayout ()
{
}
VolumeLayout::~VolumeLayout ()
{
}
VolumeLayoutList VolumeLayout::GetAvailableLayouts (VolumeType::Enum type)
{
VolumeLayoutList layouts;
layouts.push_back (shared_ptr (new VolumeLayoutV2Normal ()));
layouts.push_back (shared_ptr (new VolumeLayoutV1Normal ()));
layouts.push_back (shared_ptr (new VolumeLayoutV2Hidden ()));
layouts.push_back (shared_ptr (new VolumeLayoutV1Hidden ()));
layouts.push_back (shared_ptr (new VolumeLayoutSystemEncryption ()));
if (type != VolumeType::Unknown)
{
VolumeLayoutList l;
foreach (shared_ptr vl, layouts)
{
if (vl->GetType() == type)
l.push_back (vl);
}
layouts = l;
}
return layouts;
}
shared_ptr VolumeLayout::GetHeader ()
{
if (Header.get() == nullptr)
Header.reset (new VolumeHeader (GetHeaderSize()));
return Header;
}
VolumeLayoutV1Normal::VolumeLayoutV1Normal ()
{
Type = VolumeType::Normal;
HeaderOffset = GST_VOLUME_HEADER_OFFSET;
HeaderSize = GST_VOLUME_HEADER_SIZE_LEGACY;
SupportedEncryptionAlgorithms.push_back (shared_ptr (new GOST ()));
SupportedEncryptionModes.push_back (shared_ptr (new EncryptionModeXTS ()));
SupportedEncryptionModes.push_back (shared_ptr (new EncryptionModeLRW ()));
SupportedEncryptionModes.push_back (shared_ptr (new EncryptionModeCBC ()));
}
uint64 VolumeLayoutV1Normal::GetDataOffset (uint64 volumeHostSize) const
{
return HeaderSize;
}
uint64 VolumeLayoutV1Normal::GetDataSize (uint64 volumeHostSize) const
{
return volumeHostSize - GetHeaderSize();
}
VolumeLayoutV1Hidden::VolumeLayoutV1Hidden ()
{
Type = VolumeType::Hidden;
HeaderOffset = -GST_HIDDEN_VOLUME_HEADER_OFFSET_LEGACY;
HeaderSize = GST_VOLUME_HEADER_SIZE_LEGACY;
SupportedEncryptionAlgorithms.push_back (shared_ptr (new GOST ()));
SupportedEncryptionModes.push_back (shared_ptr (new EncryptionModeXTS ()));
SupportedEncryptionModes.push_back (shared_ptr (new EncryptionModeLRW ()));
SupportedEncryptionModes.push_back (shared_ptr (new EncryptionModeCBC ()));
}
uint64 VolumeLayoutV1Hidden::GetDataOffset (uint64 volumeHostSize) const
{
return volumeHostSize - GetDataSize (volumeHostSize) + HeaderOffset;
}
uint64 VolumeLayoutV1Hidden::GetDataSize (uint64 volumeHostSize) const
{
return Header->GetHiddenVolumeDataSize ();
}
VolumeLayoutV2Normal::VolumeLayoutV2Normal ()
{
Type = VolumeType::Normal;
HeaderOffset = GST_VOLUME_HEADER_OFFSET;
HeaderSize = GST_VOLUME_HEADER_SIZE;
BackupHeaderOffset = -GST_VOLUME_HEADER_GROUP_SIZE;
SupportedEncryptionAlgorithms.push_back (shared_ptr (new GOST ()));
SupportedEncryptionModes.push_back (shared_ptr (new EncryptionModeXTS ()));
}
uint64 VolumeLayoutV2Normal::GetDataOffset (uint64 volumeHostSize) const
{
return Header->GetEncryptedAreaStart();
}
uint64 VolumeLayoutV2Normal::GetDataSize (uint64 volumeHostSize) const
{
return Header->GetVolumeDataSize();
}
uint64 VolumeLayoutV2Normal::GetMaxDataSize (uint64 volumeSize) const
{
if (volumeSize < GST_TOTAL_VOLUME_HEADERS_SIZE)
return 0;
return volumeSize - GST_TOTAL_VOLUME_HEADERS_SIZE;
}
VolumeLayoutV2Hidden::VolumeLayoutV2Hidden ()
{
Type = VolumeType::Hidden;
HeaderOffset = GST_HIDDEN_VOLUME_HEADER_OFFSET;
HeaderSize = GST_VOLUME_HEADER_SIZE;
BackupHeaderOffset = -GST_HIDDEN_VOLUME_HEADER_OFFSET;
SupportedEncryptionAlgorithms.push_back (shared_ptr (new GOST ()));
SupportedEncryptionModes.push_back (shared_ptr (new EncryptionModeXTS ()));
}
uint64 VolumeLayoutV2Hidden::GetDataOffset (uint64 volumeHostSize) const
{
return Header->GetEncryptedAreaStart();
}
uint64 VolumeLayoutV2Hidden::GetDataSize (uint64 volumeHostSize) const
{
return Header->GetVolumeDataSize();
}
uint64 VolumeLayoutV2Hidden::GetMaxDataSize (uint64 volumeSize) const
{
// Reserve free space at the end of the host filesystem
uint64 reservedSize;
if (volumeSize < GST_VOLUME_SMALL_SIZE_THRESHOLD)
reservedSize = GST_HIDDEN_VOLUME_HOST_FS_RESERVED_END_AREA_SIZE;
else
reservedSize = GST_HIDDEN_VOLUME_HOST_FS_RESERVED_END_AREA_SIZE_HIGH; // Ensure size of a hidden volume larger than GST_VOLUME_SMALL_SIZE_THRESHOLD is a multiple of the maximum supported sector size
if (volumeSize < reservedSize)
return 0;
return volumeSize - reservedSize;
}
VolumeLayoutSystemEncryption::VolumeLayoutSystemEncryption ()
{
Type = VolumeType::Normal;
HeaderOffset = GST_BOOT_VOLUME_HEADER_SECTOR_OFFSET;
HeaderSize = GST_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE;
SupportedEncryptionAlgorithms.push_back (shared_ptr (new GOST ()));
SupportedEncryptionModes.push_back (shared_ptr (new EncryptionModeXTS ()));
}
uint64 VolumeLayoutSystemEncryption::GetDataOffset (uint64 volumeHostSize) const
{
return 0;
}
uint64 VolumeLayoutSystemEncryption::GetDataSize (uint64 volumeHostSize) const
{
return volumeHostSize;
}
Pkcs5KdfList VolumeLayoutSystemEncryption::GetSupportedKeyDerivationFunctions () const
{
Pkcs5KdfList l;
l.push_back (shared_ptr (new Pkcs5HmacStribog ()));
return l;
}
}
GostCrypt_MacOSX_1.0/Volume/._VolumeLayout.h 000755 000765 000024 00000000261 12361324353 021004 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/VolumeLayout.h 000755 000765 000024 00000012666 12361324353 020603 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Volume_VolumeLayout
#define GST_HEADER_Volume_VolumeLayout
#include "Platform/Platform.h"
#include "Volume/EncryptionAlgorithm.h"
#include "Volume/EncryptionMode.h"
#include "Volume/Pkcs5Kdf.h"
#include "VolumeHeader.h"
namespace GostCrypt
{
class VolumeLayout;
typedef list < shared_ptr > VolumeLayoutList;
class VolumeLayout
{
public:
virtual ~VolumeLayout ();
static VolumeLayoutList GetAvailableLayouts (VolumeType::Enum type = VolumeType::Unknown);
virtual int GetBackupHeaderOffset () const { return BackupHeaderOffset; } // Positive value: offset from the start of host, negative: offset from the end
virtual uint64 GetDataOffset (uint64 volumeHostSize) const = 0;
virtual uint64 GetDataSize (uint64 volumeHostSize) const = 0;
virtual shared_ptr GetHeader ();
virtual int GetHeaderOffset () const { return HeaderOffset; } // Positive value: offset from the start of host, negative: offset from the end
virtual uint32 GetHeaderSize () const { return HeaderSize; }
virtual uint64 GetMaxDataSize (uint64 volumeSize) const = 0;
virtual EncryptionAlgorithmList GetSupportedEncryptionAlgorithms () const { return SupportedEncryptionAlgorithms; }
virtual Pkcs5KdfList GetSupportedKeyDerivationFunctions () const { return Pkcs5Kdf::GetAvailableAlgorithms(); }
virtual EncryptionModeList GetSupportedEncryptionModes () const { return SupportedEncryptionModes; }
virtual VolumeType::Enum GetType () const { return Type; }
virtual bool HasBackupHeader () const = 0;
virtual bool HasDriveHeader () const { return false; }
virtual void SetHeader (shared_ptr header) { Header = header; }
protected:
VolumeLayout ();
EncryptionAlgorithmList SupportedEncryptionAlgorithms;
EncryptionModeList SupportedEncryptionModes;
int BackupHeaderOffset;
int HeaderOffset;
uint32 HeaderSize;
VolumeType::Enum Type;
shared_ptr Header;
private:
VolumeLayout (const VolumeLayout &);
VolumeLayout &operator= (const VolumeLayout &);
};
class VolumeLayoutV1Normal : public VolumeLayout
{
public:
VolumeLayoutV1Normal ();
virtual ~VolumeLayoutV1Normal () { }
virtual int GetBackupHeaderOffset () const { throw NotApplicable (SRC_POS); }
virtual uint64 GetDataOffset (uint64 volumeHostSize) const;
virtual uint64 GetDataSize (uint64 volumeHostSize) const;
virtual uint64 GetMaxDataSize (uint64 volumeSize) const { throw NotApplicable (SRC_POS); }
virtual bool HasBackupHeader () const { return false; }
private:
VolumeLayoutV1Normal (const VolumeLayoutV1Normal &);
VolumeLayoutV1Normal &operator= (const VolumeLayoutV1Normal &);
};
class VolumeLayoutV1Hidden : public VolumeLayout
{
public:
VolumeLayoutV1Hidden ();
virtual ~VolumeLayoutV1Hidden () { }
virtual int GetBackupHeaderOffset () const { throw NotApplicable (SRC_POS); }
virtual uint64 GetDataOffset (uint64 volumeHostSize) const;
virtual uint64 GetDataSize (uint64 volumeHostSize) const;
virtual uint64 GetMaxDataSize (uint64 volumeSize) const { throw NotApplicable (SRC_POS); }
virtual bool HasBackupHeader () const { return false; }
private:
VolumeLayoutV1Hidden (const VolumeLayoutV1Hidden &);
VolumeLayoutV1Hidden &operator= (const VolumeLayoutV1Hidden &);
};
class VolumeLayoutV2Normal : public VolumeLayout
{
public:
VolumeLayoutV2Normal ();
virtual ~VolumeLayoutV2Normal () { }
virtual uint64 GetDataOffset (uint64 volumeHostSize) const;
virtual uint64 GetDataSize (uint64 volumeHostSize) const;
virtual uint64 GetMaxDataSize (uint64 volumeSize) const;
virtual bool HasBackupHeader () const { return true; }
private:
VolumeLayoutV2Normal (const VolumeLayoutV2Normal &);
VolumeLayoutV2Normal &operator= (const VolumeLayoutV2Normal &);
};
class VolumeLayoutV2Hidden : public VolumeLayout
{
public:
VolumeLayoutV2Hidden ();
virtual ~VolumeLayoutV2Hidden () { }
virtual uint64 GetDataOffset (uint64 volumeHostSize) const;
virtual uint64 GetDataSize (uint64 volumeHostSize) const;
virtual uint64 GetMaxDataSize (uint64 volumeSize) const;
virtual bool HasBackupHeader () const { return true; }
private:
VolumeLayoutV2Hidden (const VolumeLayoutV2Hidden &);
VolumeLayoutV2Hidden &operator= (const VolumeLayoutV2Hidden &);
};
class VolumeLayoutSystemEncryption : public VolumeLayout
{
public:
VolumeLayoutSystemEncryption ();
virtual ~VolumeLayoutSystemEncryption () { }
virtual int GetBackupHeaderOffset () const { throw NotApplicable (SRC_POS); }
virtual uint64 GetDataOffset (uint64 volumeHostSize) const;
virtual uint64 GetDataSize (uint64 volumeHostSize) const;
virtual uint64 GetMaxDataSize (uint64 volumeSize) const { throw NotApplicable (SRC_POS); }
virtual Pkcs5KdfList GetSupportedKeyDerivationFunctions () const;
virtual bool HasBackupHeader () const { return false; }
virtual bool HasDriveHeader () const { return true; }
private:
VolumeLayoutSystemEncryption (const VolumeLayoutSystemEncryption &);
VolumeLayoutSystemEncryption &operator= (const VolumeLayoutSystemEncryption &);
};
}
#endif // GST_HEADER_Volume_VolumeLayout
GostCrypt_MacOSX_1.0/Volume/._VolumePassword.cpp 000755 000765 000024 00000000261 12361324353 021664 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/VolumePassword.cpp 000755 000765 000024 00000007551 12361324353 021460 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "VolumePassword.h"
#include "Platform/SerializerFactory.h"
#include "Platform/StringConverter.h"
namespace GostCrypt
{
VolumePassword::VolumePassword () : PasswordSize (0), Unportable (false)
{
AllocateBuffer ();
}
VolumePassword::VolumePassword (const char *password, size_t size)
{
Set ((const byte *) password, size);
}
VolumePassword::VolumePassword (const byte *password, size_t size)
{
Set (password, size);
}
VolumePassword::VolumePassword (const wchar_t *password, size_t charCount)
{
Set (password, charCount);
}
VolumePassword::VolumePassword (const wstring &password)
{
Set (password.c_str(), password.size());
}
VolumePassword::~VolumePassword ()
{
}
void VolumePassword::AllocateBuffer ()
{
if (!PasswordBuffer.IsAllocated ())
PasswordBuffer.Allocate (MaxSize);
}
void VolumePassword::CheckPortability () const
{
if (Unportable || !IsPortable())
throw UnportablePassword (SRC_POS);
}
void VolumePassword::Deserialize (shared_ptr stream)
{
Serializer sr (stream);
uint64 passwordSize;
sr.Deserialize ("PasswordSize", passwordSize);
PasswordSize = static_cast (passwordSize);
sr.Deserialize ("PasswordBuffer", BufferPtr (PasswordBuffer));
Buffer wipeBuffer (128 * 1024);
sr.Deserialize ("WipeData", wipeBuffer);
}
bool VolumePassword::IsPortable () const
{
for (size_t i = 0; i < PasswordSize; i++)
{
if (PasswordBuffer[i] >= 0x7f || PasswordBuffer[i] < 0x20)
return false;
}
return true;
}
void VolumePassword::Serialize (shared_ptr stream) const
{
Serializable::Serialize (stream);
Serializer sr (stream);
sr.Serialize ("PasswordSize", static_cast (PasswordSize));
sr.Serialize ("PasswordBuffer", ConstBufferPtr (PasswordBuffer));
// Wipe password from an eventual pipe buffer
Buffer wipeBuffer (128 * 1024);
wipeBuffer.Zero();
sr.Serialize ("WipeData", ConstBufferPtr (wipeBuffer));
}
void VolumePassword::Set (const byte *password, size_t size)
{
AllocateBuffer ();
if (size > MaxSize)
throw PasswordTooLong (SRC_POS);
PasswordBuffer.CopyFrom (ConstBufferPtr (password, size));
PasswordSize = size;
Unportable = !IsPortable();
}
void VolumePassword::Set (const wchar_t *password, size_t charCount)
{
if (charCount > MaxSize)
throw PasswordTooLong (SRC_POS);
union Conv
{
byte b[sizeof (wchar_t)];
wchar_t c;
};
Conv conv;
conv.c = L'A';
int lsbPos = -1;
for (size_t i = 0; i < sizeof (conv.b); ++i)
{
if (conv.b[i] == L'A')
{
lsbPos = i;
break;
}
}
if (lsbPos == -1)
throw ParameterIncorrect (SRC_POS);
bool unportable = false;
byte passwordBuf[MaxSize];
for (size_t i = 0; i < charCount; ++i)
{
conv.c = password[i];
passwordBuf[i] = conv.b[lsbPos];
for (int j = 0; j < (int) sizeof (wchar_t); ++j)
{
if (j != lsbPos && conv.b[j] != 0)
unportable = true;
}
}
Set (passwordBuf, charCount);
if (unportable)
Unportable = true;
}
void VolumePassword::Set (const ConstBufferPtr &password)
{
Set (password, password.Size());
}
void VolumePassword::Set (const VolumePassword &password)
{
Set (password.DataPtr(), password.Size());
}
GST_SERIALIZER_FACTORY_ADD_CLASS (VolumePassword);
#define GST_EXCEPTION(TYPE) GST_SERIALIZER_FACTORY_ADD(TYPE)
#undef GST_EXCEPTION_NODECL
#define GST_EXCEPTION_NODECL(TYPE) GST_SERIALIZER_FACTORY_ADD(TYPE)
GST_SERIALIZER_FACTORY_ADD_EXCEPTION_SET (PasswordException);
}
GostCrypt_MacOSX_1.0/Volume/._VolumePassword.h 000755 000765 000024 00000000261 12361324353 021331 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/VolumePassword.h 000755 000765 000024 00000006371 12361324353 021124 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Encryption_Password
#define GST_HEADER_Encryption_Password
#include "Platform/Platform.h"
#include "Platform/Serializable.h"
namespace GostCrypt
{
class VolumePassword : public Serializable
{
public:
VolumePassword ();
VolumePassword (const byte *password, size_t size);
VolumePassword (const char *password, size_t size);
VolumePassword (const wchar_t *password, size_t charCount);
VolumePassword (const wstring &password);
VolumePassword (const VolumePassword &password) { Set (password); }
virtual ~VolumePassword ();
bool operator== (const VolumePassword &other) const { return ConstBufferPtr (DataPtr(), Size()).IsDataEqual (ConstBufferPtr (other.DataPtr(), other.Size())); }
bool operator!= (const VolumePassword &other) const { return !(*this == other); }
VolumePassword &operator= (const VolumePassword &password) { Set (password); return *this; }
operator BufferPtr () const { return BufferPtr (PasswordBuffer); }
void CheckPortability () const;
byte *DataPtr () const { return PasswordBuffer; }
bool IsEmpty () const { return PasswordSize == 0; }
size_t Size () const { return PasswordSize; }
void Set (const byte *password, size_t size);
void Set (const wchar_t *password, size_t charCount);
void Set (const ConstBufferPtr &password);
void Set (const VolumePassword &password);
GST_SERIALIZABLE (VolumePassword);
static const size_t MaxSize = 64;
static const size_t WarningSizeThreshold = 12;
protected:
void AllocateBuffer ();
bool IsPortable () const;
SecureBuffer PasswordBuffer;
size_t PasswordSize;
bool Unportable;
};
struct PasswordException : public Exception
{
protected:
PasswordException () { }
PasswordException (const string &message) : Exception (message) { }
PasswordException (const string &message, const wstring &subject) : Exception (message, subject) { }
};
GST_EXCEPTION_DECL (PasswordIncorrect, PasswordException);
GST_EXCEPTION_DECL (PasswordKeyfilesIncorrect, PasswordIncorrect);
GST_EXCEPTION_DECL (PasswordOrKeyboardLayoutIncorrect, PasswordException);
GST_EXCEPTION_DECL (PasswordOrMountOptionsIncorrect, PasswordException);
GST_EXCEPTION_DECL (ProtectionPasswordIncorrect, PasswordIncorrect);
GST_EXCEPTION_DECL (ProtectionPasswordKeyfilesIncorrect, PasswordIncorrect);
#define GST_EXCEPTION(NAME) GST_EXCEPTION_DECL(NAME,PasswordException)
#undef GST_EXCEPTION_SET
#define GST_EXCEPTION_SET \
GST_EXCEPTION_NODECL (PasswordIncorrect); \
GST_EXCEPTION_NODECL (PasswordKeyfilesIncorrect); \
GST_EXCEPTION_NODECL (PasswordOrKeyboardLayoutIncorrect); \
GST_EXCEPTION_NODECL (PasswordOrMountOptionsIncorrect); \
GST_EXCEPTION_NODECL (ProtectionPasswordIncorrect); \
GST_EXCEPTION_NODECL (ProtectionPasswordKeyfilesIncorrect); \
GST_EXCEPTION (PasswordEmpty); \
GST_EXCEPTION (PasswordTooLong); \
GST_EXCEPTION (UnportablePassword);
GST_EXCEPTION_SET;
#undef GST_EXCEPTION
}
#endif // GST_HEADER_Encryption_Password
GostCrypt_MacOSX_1.0/Volume/._VolumePasswordCache.cpp 000755 000765 000024 00000000261 12361324353 022610 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/VolumePasswordCache.cpp 000755 000765 000024 00000002201 12361324353 022367 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "VolumePasswordCache.h"
namespace GostCrypt
{
CachedPasswordList VolumePasswordCache::GetPasswords ()
{
CachedPasswordList passwords;
foreach_ref (const VolumePassword &password, CachedPasswords)
passwords.push_back (make_shared (VolumePassword (password)));
return passwords;
}
void VolumePasswordCache::Store (const VolumePassword &newPassword)
{
CachedPasswordList::iterator iter = CachedPasswords.begin();
foreach_ref (const VolumePassword &password, CachedPasswords)
{
if (newPassword == password)
{
CachedPasswords.erase (iter);
break;
}
iter++;
}
CachedPasswords.push_front (make_shared (VolumePassword (newPassword)));
if (CachedPasswords.size() > Capacity)
CachedPasswords.pop_back();
}
CachedPasswordList VolumePasswordCache::CachedPasswords;
}
GostCrypt_MacOSX_1.0/Volume/._VolumePasswordCache.h 000755 000765 000024 00000000261 12361324353 022255 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/VolumePasswordCache.h 000755 000765 000024 00000001716 12361324353 022046 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Volume_VolumePasswordCache
#define GST_HEADER_Volume_VolumePasswordCache
#include "Platform/Platform.h"
#include "VolumePassword.h"
namespace GostCrypt
{
typedef list < shared_ptr < VolumePassword > > CachedPasswordList;
class VolumePasswordCache
{
public:
static CachedPasswordList GetPasswords ();
static bool IsEmpty () { return CachedPasswords.empty(); }
static void Store (const VolumePassword &newPassword);
static void Clear () { CachedPasswords.clear(); }
static const size_t Capacity = 4;
protected:
static CachedPasswordList CachedPasswords;
private:
VolumePasswordCache ();
};
}
#endif // GST_HEADER_Volume_VolumePasswordCache
GostCrypt_MacOSX_1.0/Volume/._VolumeSlot.h 000755 000765 000024 00000000261 12361324353 020450 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Volume/VolumeSlot.h 000755 000765 000024 00000000736 12361324353 020242 0 ustar 00cvo staff 000000 000000 /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#ifndef GST_HEADER_Volume_VolumeSlot
#define GST_HEADER_Volume_VolumeSlot
#include "Platform/Platform.h"
namespace GostCrypt
{
typedef uint32 VolumeSlotNumber;
}
#endif // GST_HEADER_Volume_VolumeSlot
GostCrypt_MacOSX_1.0/Resources/._Icons 000755 000765 000024 00000000261 12361425667 017701 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Resources/Icons/ 000755 000765 000024 00000000000 12361425667 017537 5 ustar 00cvo staff 000000 000000 GostCrypt_MacOSX_1.0/Resources/._Texts 000755 000765 000024 00000000261 12361425667 017735 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Resources/Texts/ 000755 000765 000024 00000000000 12361425667 017573 5 ustar 00cvo staff 000000 000000 GostCrypt_MacOSX_1.0/Resources/Texts/._License.rtf 000755 000765 000024 00000000261 12352027054 022075 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Resources/Texts/License.rtf 000755 000765 000024 00000211007 12352027054 021662 0 ustar 00cvo staff 000000 000000 {\rtf1\ansi\deff3\adeflang1025
{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\fnil\fprq0\fcharset0 Times{\*\falt Times New Roman};}{\f4\fnil\fprq0\fcharset0 Helvetica{\*\falt Arial};}{\f5\fmodern\fprq1\fcharset0 Nimbus Mono L{\*\falt Courier New};}{\f6\froman\fprq2\fcharset0 Nimbus Roman No9 L{\*\falt Times New Roman};}{\f7\fnil\fprq2\fcharset0 HG Mincho Light J{\*\falt msmincho};}{\f8\fnil\fprq2\fcharset0 Tahoma;}{\f9\fnil\fprq0\fcharset0 Tahoma;}}
{\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
{\stylesheet{\s0\snext0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\ltrpar\cf0\dbch\af10\langfe255\dbch\af8\afs24\alang255\loch\f3\fs24\lang9226 Default Style;}
{\s15\sbasedon0\snext16\sb240\sa120\keepn\dbch\af7\dbch\af8\afs28\loch\f4\fs28 Heading;}
{\s16\sbasedon0\snext16\sb0\sa120 Text Body;}
{\s17\sbasedon16\snext17\sb0\sa120\dbch\af9\loch\f3 List;}
{\s18\sbasedon0\snext18\sb120\sa120\noline\i\dbch\af9\afs24\ai\loch\f3\fs24 Caption;}
{\s19\sbasedon0\snext19\noline\dbch\af9\loch\f3 Index;}
{\s20\sbasedon0\snext20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20 Preformatted Text;}
}{\info{\creatim\yr0\mo0\dy0\hr0\min0}{\author carlos luna}{\revtim\yr2007\mo11\dy5\hr17\min33}{\printim\yr0\mo0\dy0\hr0\min0}{\comment LibreOffice}{\vern4000}}\deftab709
\viewscale75
{\*\pgdsctbl
{\pgdsc0\pgdscuse451\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\pgdscnxt0 Default Style;}}
\formshade\paperh16838\paperw11906\margl1134\margr1134\margt1134\margb1134\sectd\sbknone\sectunlocked1\pgndec\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
\pgndec\pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qc{\b\afs52\ab\rtlch \ltrch\loch\fs52
GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qc\b\afs36\ab\rtlch \ltrch\loch\fs36
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qc\rtlch \ltrch\loch
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Copyright (C) 2007 Free Software Foundation, Inc. }
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Preamble}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
The GNU General Public License is a free, copyleft license for software and other kinds of works.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
your programs, too.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Developers that use the GNU GPL protect your rights with two steps:}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
(1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
The precise terms and conditions for copying, distribution and modification follow.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qc{\afs28\rtlch \ltrch\loch\fs28\loch\f6
TERMS AND CONDITIONS}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
0. Definitions.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
"This License" refers to version 3 of the GNU General Public License.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
A "covered work" means either the unmodified Program or a work based on the Program.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\loch\fs28\loch\f6
To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\loch\fs28\loch\f6
public, and in some countries other activities as well.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\loch\fs28\loch\f6
To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
1. Source Code.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require,}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
such as by intimate data communication or control flow between those subprograms and other parts of the work.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
The Corresponding Source for a work in source code form is that same work.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
2. Basic Permissions.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
rights of fair use or other equivalent, as provided by copyright law.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
3. Protecting Users' Legal Rights From Anti-Circumvention Law.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
4. Conveying Verbatim Copies.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code;}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
5. Conveying Modified Source Versions.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
a) The work must carry prominent notices stating that you modified}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
it, and giving a relevant date.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section }
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
7. This requirement modifies the requirement in section 4 to "keep intact all notices".}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
6. Conveying Non-Source Forms.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
7. Additional Terms.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
8. Termination.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
prior to 60 days after the cessation.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
9. Acceptance Not Required for Having Copies.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
10. Automatic Licensing of Downstream Recipients.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
11. Patents.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version".}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
country that you have reason to believe are valid.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
work and works based on it.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
12. No Surrender of Others' Freedom.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
13. Use with the GNU Affero General Public License.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
combination as such.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
14. Revised Versions of this License.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
15. Disclaimer of Warranty.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
16. Limitation of Liability.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
17. Interpretation of Sections 15 and 16.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
END OF TERMS AND CONDITIONS}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
How to Apply These Terms to Your New Programs}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Copyright (C) }
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
You should have received a copy of the GNU General Public License along with this program. If not, see .}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Also add information on how to contact you by electronic and paper mail.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
Copyright (C) }
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box".}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary.}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\loch\fs28\loch\f6
For more information on this, and how to apply and follow the GNU GPL, see .}
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\afs28\rtlch \ltrch\loch\fs28\loch\f6
\par \pard\plain \s20\sb0\sa0\dbch\af5\dbch\af5\afs20\loch\f5\fs20\qj{\afs28\rtlch \ltrch\fs28\loch\f6
}{\afs28\rtlch \ltrch\loch\fs28\loch\f6
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read .}
\par } GostCrypt_MacOSX_1.0/Resources/Icons/._GostCrypt-16x16.xpm 000755 000765 000024 00000000261 12322717710 023213 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Resources/Icons/GostCrypt-16x16.xpm 000755 000765 000024 00000002413 12322717710 022777 0 ustar 00cvo staff 000000 000000 /* XPM */
static const char *GostCryptIcon16x16[] = {
"16 16 60 1 0 0",
" c #000000",
"! c #27A527",
"# c #268825",
"$ c #234522",
"% c #234622",
"& c #234422",
"' c #245923",
"( c #27A027",
") c #268F26",
"* c #279D26",
"+ c #257B24",
", c #244C22",
"- c #245223",
". c #269226",
"/ c #245523",
"0 c #268E26",
"1 c #246F24",
"2 c #257724",
"3 c #244E23",
"4 c #269626",
"5 c #245823",
"6 c #268A25",
"7 c #234722",
"8 c #246624",
"9 c #247024",
": c #246324",
"; c #245A23",
"< c #222A20",
"= c #212020",
"> c #212120",
"? c #222E20",
"@ c #258325",
"A c #269426",
"B c #223120",
"C c #212720",
"D c #222820",
"E c #223220",
"F c #279F27",
"G c #234A22",
"H c #279C26",
"I c #279E27",
"J c #244A22",
"K c #257524",
"L c #246D24",
"M c #246224",
"N c #268725",
"O c #257C25",
"P c #257E25",
"Q c #257924",
"R c #246824",
"S c #233921",
"T c #245B23",
"U c #269926",
"V c #223721",
"W c #212520",
"X c #27A427",
"Y c #245623",
"Z c #27A327",
"[ c #279D27",
"] c None",
" ",
" !!!!#$%&'(!!!! ",
" !!!)&*!!+,!!!! ",
" !!!-.!!!!/0!!! ",
" !!!%!!!!!12!!! ",
" !!!34!!!!56!!! ",
" !!!6789:;7!!!! ",
" !!!!8<=>?@!!!! ",
" !!!!ABCDEF!!!! ",
" !!!!!$AGGH!!!! ",
" !!!!IJ!$KL!!!! ",
" !!!!@M!;N$(I!! ",
" !!!O&P!QR3S#!! ",
" !!!T=U0V$PWK!! ",
" !!X@L!I,YZ[!!! ",
" "
};
GostCrypt_MacOSX_1.0/Resources/Icons/._GostCrypt-48x48.xpm 000755 000765 000024 00000000261 12322717716 023233 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Resources/Icons/GostCrypt-48x48.xpm 000755 000765 000024 00000014710 12322717716 023022 0 ustar 00cvo staff 000000 000000 /* XPM */
static const char *GostCryptIcon48x48[] = {
"48 48 108 2 0 0",
" c #063E0D",
"! c #27A527",
"# c #27A327",
"$ c #247024",
"% c #234322",
"& c #222920",
"' c #212020",
"( c #212620",
") c #233B21",
"* c #246424",
"+ c #279D26",
", c #268B25",
"- c #223321",
". c #222C20",
"/ c #244B22",
"0 c #245823",
"1 c #244F23",
"2 c #257824",
"3 c #268625",
"4 c #222A20",
"5 c #257224",
"6 c #27A427",
"7 c #258225",
"8 c #246D24",
"9 c #279A26",
": c #222B20",
"; c #222D20",
"< c #269326",
"= c #279E27",
"> c #233D21",
"? c #212220",
"@ c #245723",
"A c #269926",
"B c #233A21",
"C c #27A227",
"D c #212820",
"E c #234722",
"F c #246324",
"G c #268925",
"H c #258425",
"I c #257424",
"J c #269226",
"K c #257124",
"L c #268C25",
"M c #212420",
"N c #245223",
"O c #268E26",
"P c #245023",
"Q c #258125",
"R c #257A24",
"S c #269826",
"T c #245F24",
"U c #246C24",
"V c #244C22",
"W c #27A027",
"X c #223120",
"Y c #212520",
"Z c #223821",
"[ c #257C25",
"] c #246024",
"^ c #245E24",
"_ c #234922",
"` c #246824",
"a c #257524",
"b c #212120",
"c c #246E24",
"d c #212320",
"e c #268725",
"f c #233F21",
"g c #223220",
"h c #245623",
"i c #279F27",
"j c #223221",
"k c #212720",
"l c #222820",
"m c #257E25",
"n c #222F20",
"o c #234021",
"p c #234522",
"q c #222E20",
"r c #245A23",
"s c #269726",
"t c #246524",
"u c #244D22",
"v c #246F24",
"w c #223621",
"x c #269026",
"y c #246224",
"z c #268C26",
"{ c #279C26",
"| c #268A25",
"} c #257024",
"~ c #246624",
" ! c #245323",
"!! c #223721",
"#! c #245423",
"$! c #269526",
"%! c #234622",
"&! c #233921",
"'! c #257724",
"(! c #246A24",
")! c #269426",
"*! c #269126",
"+! c #269626",
",! c #234822",
"-! c #245B23",
".! c #268F26",
"/! c None",
"/!/!/!/!/!/!/!/!/! /!/!/!/!/!/!/!/!/!",
"/!/!/!/!/!/!/!/!/! /!/!/!/!/!/!/!/!/!",
"/!/!/!/!/!/!/!/!/! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! /!/!/!/!/!/!/!/!/!",
"/!/!/!/!/!/!/!/!/! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! /!/!/!/!/!/!/!/!/!",
"/!/!/!/!/!/!/!/!/! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! /!/!/!/!/!/!/!/!/!",
"/!/!/!/!/!/!/!/!/! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! /!/!/!/!/!/!/!/!/!",
"/!/!/!/!/!/!/!/!/! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! /!/!/!/!/!/!/!/!/!",
"/!/!/!/!/!/!/!/!/! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! /!/!/!/!/!/!/!/!/!",
"/!/!/!/!/!/!/!/!/! ! ! ! ! ! ! ! # $ % & ' ( ) * + ! ! ! ! ! ! ! ! ! ! /!/!/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/!/!/!/!/!/!/! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! /!/!/!/!/!/!/!/!/!",
"/!/!/!/!/!/!/!/!/! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! /!/!/!/!/!/!/!/!/!",
"/!/!/!/!/!/!/!/!/! /!/!/!/!/!/!/!/!/!",
"/!/!/!/!/!/!/!/!/! /!/!/!/!/!/!/!/!/!"
};
GostCrypt_MacOSX_1.0/Resources/Icons/._GostCrypt.icns 000755 000765 000024 00000000261 12322712466 022563 0 ustar 00cvo staff 000000 000000 Mac OS X 2 ± ATTR ± ˜ ˜ com.apple.quarantine q/0001;546c4716;Firefox; GostCrypt_MacOSX_1.0/Resources/Icons/GostCrypt.icns 000755 000765 000024 00000107016 12322712466 022354 0 ustar 00cvo staff 000000 000000 icns Žics# Hÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿis32 dŽ ' &€# $‚' €'€'%$' €'$&'$&€' €' #‚'$%€' €'$&'$&€' €'$ #' '$"!!"%' '&"!""‚' ‚'##‚' ‚'$'#%$' '%$'$' €'%#%'%$$#&'' €'$!&&"#%!%'' €'%$''$$‚'Ž Ž ¥ˆEFDY ¥ €¥D¥¥{L¥ €¥R’¥UŽ€¥ €¥ F‚¥ow€¥ €¥N–¥XŠ€¥ €¥ŠGfpcZG¥ ¥f* !.ƒ¥ ¥”1'(2Ÿ¥ ‚¥E”JJœ¥ ¥žJ¥Eum¥ ¥ƒb¥Z‡E ž¥¥ €¥|D~¥yhN9ˆ¥¥ €¥[ ™Ž7E~%u¥¥ ¥¥¤ƒm¥žLV£€¥Ž Ž ' %€" #‚' €'&"&''$"' €'#&'#&€' €' "‚'$$€' €'#&'#%€' €'%"€$#"' ' $ %' ' & ‚' ‚'"&""&' ‚'"'"$$' '%$'#%"' €'%"%'$$#!%'' €'# &&!"% $'' €'%$''"#‚'Ž s8mk ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿICN# ÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðil32 bƒ ‘‰ ‰ '‰ '‰ '‰ '&$$#$&ƒ'‰ €'%"$"$‚'‰ ''&"%'%"%'‰ ''#$ƒ'%#'‰ '&"&ƒ'%€'‰ '%#…'#$€'‰ '%#&„'#%€'‰ ''"%ƒ'&"&€'‰
''$#'%&'%%$$'‰ €' $ƒ!"&'‰ €'&!"€!##‚'‰ '#"! $‚'‰ '%"$!$"%‚'‰ '$$'$‚'‰ '$$'%#%#&'‰ '#%''"%'‰ '"&''"%$$'‰ ''&%#&''$$%"#$''‰ '"#''%##!#&'‰ '%#!$'&$!!'$"$%'‰ '&$#%''$"!%&%&''‰ „'%%&ƒ'‰ '‰ '‰ '‰ ‰ ‘ƒ ƒ ‘>‰ >ii>‰ >¥>‰ >¥>‰ >¥>‰ >¥˜lLJe’ƒ¥>‰
>¥¥¢x2HjmM2kž¥>‰
>¥¥€3zž¥¥ ‚5p¥>‰ >¥¤>mƒ¥z4ž€¥>‰ >¥–7ƒ¥™=€¥>‰ >¥‚A„¥Kl€¥>‰ >¥‰=˜ƒ¥¢Fq€¥>‰ >¥¢6~ƒ¥‰4”€¥>‰
>¥¥\D˜|‘¢puOJ¥>‰
>¥¥šP$$""7‘¥>‰ >€¥‹&, $;CŸ¥>‰ >€¥£>*"($'l‚¥>‰ >¥r3P*T4†‚¥>‰ >¥jL¥Ua]V¤¥>‰ >¥Tc¥qGƒ:•¥>‰ >¥>z¥˜6Ž‰ >€¥¤5‡¥¥:~]U¤™¥¥>‰ >¥žr;–¥¥U`ƒ4A\¥¥>‰ >¥—B*F¢ž~CDš?'DŽ¥>‰ >¥wD!_¥˜o'& h'W¥>‰ >¥c>z¥žf6 ‰•{“¥¥>‰ >„¥‚qŽƒ¥>‰ >¥>‰ >¥>‰ >¥>‰ >ii>‰ ‘>ƒ ƒ ‘
‰
‰
'
‰
'
‰
'
‰
'&$""$&ƒ'
‰
€'$!"$$#!$‚'
‰
''%!$'%!$'
‰
''!$ƒ'$!'
‰
'&!&ƒ'&!%€'
‰
'%!&„'"$€'
‰
'%!&„'"$€'
‰
''!%ƒ'% &€'
‰
''#"'%&'$$""'
‰
''ƒ !&'
‰
€' %‚ !"‚'
‰
' "‚ $‚'
‰
'$!# #!%‚'
‰
'$#'#$##‚'
‰
'#$'$"%!&'
‰
'!$'&!&!$'
‰
'!%''!%$#'
‰
''%$!&''#$% "#''
‰
'&" "''%!"&! "&'
‰
'$" $'&$ '$ #%'
‰
'&$!%''$! %&%&''
‰
„'%$&ƒ'
‰
'
‰
'
‰
'
‰
‰ ‘
ƒ l8mk ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ich# Hÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàih32
¶† › › —' —' —' —' —' —' …'$#"!!#$ˆ' ƒ'&"!"€$"!"%†' ‚'&!"%‚'%"!$…' ‚'""&…'#!&„' '$!&†'&"#„' '!#ˆ'$!&ƒ' €'%!%ˆ'&!$ƒ' €'%!&‰'!$ƒ' €'$!&‰'!$ƒ' €'%!%ˆ'&!$ƒ' '!$ˆ'$!%ƒ' '$!&‡'""„' '&!"'%$%''$#$$!%„' ‚'%!"€!"!!"!!$…' ƒ'$!!"„! &…' ƒ'&!#‚!"$!&…' „'€"!!"!"!"†' „'%"„! &†' …'"#%#!$%!$†' …'!$''!$'"#†' „'
%!%''#"'$!&…' „'
$!&''$!&&!$…' „'$"€'&!$'"#…' „'"#'!$'$!&„' „'!$'#"'&!$''&' ƒ'&!%'$!&'""$#%' €'&$#"!&'&!$'$!!#$' €'"!!€'&$#!$'&!!"#%€' €'$$!!#€'%$!!"''#!!$$€' €'$$!!$€'
&$"!!&'$"$%' €'&%$#%€'#!!$†' ‰'€$ &‡' —' —' —' —' —' —' › ›† † ›> ›> >>—¥>> >>—¥>> >>—¥>> >>—¥>> >>—¥>> >>—¥>> >>„¥£pC) &;d‡¥>> >>ƒ¥
‹3 ,KXO3 )x†¥>> >>‚¥†&*r¤¥‚3 m…¥>> >>¥š+-“„¥ž="†„¥>> >>¥W ††¥™):„¥>> >>€¥¢(Gˆ¥c ‰ƒ¥>> >>€¥„ tˆ¥’ cƒ¥>> >>€¥q Œ‰¥$Rƒ¥>> >>€¥p Ž‰¥&Pƒ¥>> >>€¥ zˆ¥˜ _ƒ¥>> >>€¥ž$Pˆ¥l ƒ¥>> >>¥L$’†¥ 11¤ƒ¥>> >>¥’%8ž|`z¥ž^IhL x„¥>> >>‚¥u!)€ +( ) W…¥>> >>ƒ¥n 1 # ˜…¥>> >>ƒ¥‡ ?$ 2V ’…¥>> >>ƒ¥
Ÿ*2- '* -'8†¥>> >>„¥ ‚( ''"% Œ†¥>> >>…¥1C~G d„ m†¥>> >>„¥ ž ^¥¤(L¥/@†¥>> >>„¥
‚ x¥¥E.¥Z!—…¥>> >>„¥
h “¥¥e “‹ h…¥>> >>„¥M(€¥‰ o¥2:…¥>> >>„¥6?€¥¤(L¥_ “„¥>> >>ƒ¥¢#W¥E.¥ b¥¢Œ¥>> >>€¥žœ¥Š p¥f ’¥82REt¥>> >>€¥’S;7 Œ¥ Š n¥e :T¤€¥>> >>€¥E* $£¥¥†^= L¥• 2Fq€¥>> >>€¥_P% 9€¥wj$ -¥¥= bV€¥>> >>€¥bb P€¥”`8 ‘¥j(R‚¤€¥>> >>€¥–z_Er€¥“HH p¥ ¢ƒ¥>> >>‰¥[Rj‡¥>> >>—¥>> >>—¥>> >>—¥>> >>—¥>> >>—¥>> >>—¥>> ›> ›>† † ›
›
—'
—'
—'
—'
—'
—'
…'$"€ !$&‡'
ƒ'
%! "##! $†'
‚'% $‚'%! $…'
'& &…'! %„'
'# %†'& !„'
' "ˆ'$ %ƒ'
€'% $ˆ'& $ƒ'
€'$ %‰' #ƒ'
€'$ &‰' #ƒ'
€'% $ˆ'& $ƒ'
' #ˆ'$ %ƒ'
'" &‡' „'
'& !'%$$''$"$" $„'
‚' $ˆ #…'
ƒ' $‡ &…'
ƒ'% !ƒ # &…'
„' !„ !†'
„' %… %†'
…' "%" $% $†'
…' $'' "' !†'
„'
% $''" '# &…'
„'
$ &''$ &% $…'
„'" €'% $'!!…'
„'!!' "'$ &„'
„' #'" '& $''&'
'&'% $'$ &'! #"$'
€'!! &'% $'$ !#'
€'&"€ €'%$! "'& !"$€'
€'$# !€'$$€ ''! $#€'
€'$$ #€'
&$! &'$ #%'
€'&$$"$€'&"" $†'
‰'##$&‡'
—'
—'
—'
—'
—'
—'
›
›
† h8mk ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ it32 (Ò • Í Í Í Í Í ‚ Á ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ ˜')+,,+*(Ÿ' ‚ ‚ “'(,14…763/*›' ‚ ‚ ‘'*16Œ74.(˜' ‚ ‚ '*3‘76/(–' ‚ ‚ '(0•75,•' ‚ ‚ Œ'*5…730-+€*,.15…7 0”' ‚ ‚ ‹',6ƒ74-(ˆ'*06ƒ73(’' ‚ ‚ Š' -ƒ74+'(0ƒ74(‘' ‚ ‚ ‰' ,ƒ7 .‘'*4‚74(' ‚ ‚ ˆ'*675*”' 0‚7 3' ‚ ‚ ‡'(575)–' /‚7 /' ‚ ‚ ‡' 175)˜' /‚7 *Ž' ‚ ‚ †' +76*š' 17 4Ž' ‚ ‚ †' 47 .›'(57 -' ‚ ‚ …' ,7 3' +7 5' ‚ ‚ …' 37 *ž' 27 ,Œ' ‚ ‚ „' )7 3Ÿ' *7 2Œ' ‚ ‚ „' .7 , ' 4€76(‹' ‚ ‚ „' 2€7 6¡' .7 ,‹' ‚ ‚ „' 6€7 2¡' )7 /‹' ‚ ‚ ƒ' )7 .¢' 6€7 3‹' ‚ ‚ ƒ' +7 +¢' 3€7 5‹' ‚ ‚ ƒ' -7 )¢' 1€7 6‹' ‚ ‚ ƒ' .7 (¢' 07‹' ‚ ‚ ƒ' .7£' /7 (Š' ‚ ‚ ƒ' .7 (¢' 07‹' ‚ ‚ ƒ' -7 )¢' 1€7 6‹' ‚ ‚ ƒ' +7 +¢' 3€7 4‹' ‚ ‚ ƒ' )7 .¢' 6€7 2‹' ‚ ‚ „' 5€7 2¡' *7 /‹' ‚ ‚ „' 2€76( ' /7 +‹' ‚ ‚ „' -7 - ' 5€7 6Œ' ‚ ‚ „' (7 4Ÿ' ,7 1Œ' ‚ ‚ …' 17 ,ž' 47 +Œ' ‚ ‚ …' *75(œ' -7 4' ‚ ‚ †' 27 0›')67 ,' ‚ ‚ †' *‚7 ,’'()(‚' 37 3Ž' ‚ ‚ ‡' /76+'*.11/+„'(/4€750)'276)Ž' ‚ ‚ ˆ' 476+'+4ƒ74,',6…7 3‚7 -' ‚ ‚ ˆ')6‚7 1‡73554Œ7 1' ‚ ‚ ‰'+6ž7 2‘' ‚ ‚ Š'+6…744‰70/6ƒ73(‘' ‚ ‚ ‹'*5ƒ760/‰7 6…7 -’' ‚ ‚ Œ')6š7 1’' ‚ ‚ '›7 3’' ‚ ‚ Œ' (•75-0€7 3’' ‚ ‚ Œ' (7./57/''4€7 1’' ‚ ‚ ' 5€73''6Œ7-'.7 .’' ‚ ‚ ' 070'4Œ7/176(’' ‚ ‚ ' )‚766„7 /Š7 /“' ‚ ‚ Ž' .‰71'0ˆ7 2”' ‚ ‚ ' 0ˆ765ˆ7 2•' ‚ ‚ '-6“7 0•' ‚ ‚ ‘' 3€7615†70*+4€7 6•' ‚ ‚ ‘' 6€71'(06ƒ7 /€' .7 ,”' ‚ ‚ ' )7 .€'(,.6€7 1€' )7 1”' ‚ ‚ ' ,7 +ƒ' 3€7 5' 3€76(“' ‚ ‚ ' /7 (ƒ' /7 )€' .7 ,“' ‚ ‚ ' 2€7 5„' +7 -€' (7 2“' ‚ ‚ ' 5€7 2…' 6€7 1' 27 (’' ‚ ‚ ' (7 /…' 3€7 5' -7 -’' ‚ ‚ ' +7 ,…' .7 )€'(6€7 3’' ‚ ‚ ' .7 )…' *7 .' 17 )‘' ‚ ‚ ' 1€7 5‡' 6€7 2' ,7 .‘' ‚ ‚ ' 5€7 2‡' 2€7 6‚' 6€7 4‘' ‚ ‚ Ž' (7 /‡' .7 *' 17 )' ‚ ‚ Ž' +7 ,‡' *7 .' +7 /' ‚ ‚ Ž' .7 )ˆ' 6€7 2‚' 5€7 5' ‚ ‚ Ž' 1€7 6‰' 2€7 6‚' 07 *' ‚ ‚ Ž' 4€7 3‰' .7 *' *7 0' ‚ ‚ Ž'7 0‰' *7 .‚' 4€7 5' ‚ ‚ ' *7 -Š' 6€7 2‚' /7 +Ž' ‚ ‚ ' -7 *Š' 2€7 6‚' )7 1Ž' ‚ ‚ ' 0€7 6‹' .7 *‚' 4€7 6ƒ').4)„' ‚ ‚ ' 3€7 4‹' *7 .‚' .7,''(-3€7 -„' ‚ ‚ ' 6€7 0Œ' 5€7 2‚' )72,2€75/*…' ‚ ‚ „'/,)‚' *7 -Œ' 1€7 6ƒ' 3„75+''()„' ‚ ‚ ƒ' )€7630-*-7 *Œ' -7 +‚' -…7),261„' ‚ ‚ ƒ'(-036†7 (Œ' )7 /‚'(6‡761„' ‚ ‚ ˆ' -„7 4Ž' 5€7 3ƒ' 2…73-(''(‚' ‚ ‚ „'32/,0„7 1‹'(+/6€7 6ƒ' ,…7)'+160‚' ‚ ‚ ƒ' (‰7 .ˆ'+/36„7 +‚'(6„735€7 2‚' ‚ ‚ „'(+.1…7 +†'26ˆ7 /ƒ' 1†74.)ƒ' ‚ ‚ ‚'*/,('(…7 (†'462.*.„7 3ƒ' +…7,''(-.' ‚ ‚ ‚' /€753„7 5‡' (€'(/„76(ƒ' 6„7/,1676' ‚ ‚ ‚'*/25†7 2ˆ')04‡7 +ƒ' 0‡73.(' ‚ ‚ †'(3„7 /ˆ')77624„7 /ƒ' *„74/)„' ‚ ‚ '(52/,)4„7 +‰'.*''.„7 3„' 5€750*‡' ‚ ‚ '*4‰7 (Š')-16…7 (ƒ'/60+Š' ‚ ‚ ƒ'(+.14ƒ7 5‰'*5‰7 +ƒ' (' ‚ ‚ ‰'*-0362‰'(651-)2„7 /”' ‚ ‚ Ž' (Š' (€'(1‚751,”' ‚ ‚ œ'(,04€762-)—' ‚ ‚ œ'+7762.*›' ‚ ‚ '.*Ÿ' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á' ‚ ‚ Á ‚ Í Í Í Í Í• • Í> Í> Í> Í> Í> ‚> jÁ„ n‚> ‚> Á¥ …‚> ‚> Á¥ …‚> ‚> Á¥ …‚> ‚> Á¥ …‚> ‚> Á¥ …‚> ‚> Á¥ …‚> ‚> Á¥ …‚> ‚> Á¥ …‚> ‚> Á¥ …‚> ‚> Á¥ …‚> ‚> Á¥ …‚> ‚> Á¥ …‚> ‚> —¥¢”Š…ƒ‡Ž›Ÿ¥ …‚> ‚> “¥Ÿ€aH7„5>To›¥ …‚> ‚> ‘¥]9Œ5Gsž˜¥ …‚> ‚> ¥ŽS‘5