online
     h      online
     	h      	online
  "   lY>e82%1hh      online
     h      online
  "   laeJu@plJbѿ     RSA OAEP SHA2 vector creation
=============================

This page documents the code that was used to generate the RSA OAEP SHA2
test vectors as well as code used to verify them against another
implementation.


Creation
--------

``cryptography`` was modified to allow the use of SHA2 in OAEP encryption. Then
the following python script was run to generate the vector files.

.. literalinclude:: /development/custom-vectors/rsa-oaep-sha2/generate_rsa_oaep_sha2.py

Download link: :download:`generate_rsa_oaep_sha2.py
</development/custom-vectors/rsa-oaep-sha2/generate_rsa_oaep_sha2.py>`


Verification
------------

A Java 8 program was written using `Bouncy Castle`_ to load and verify the test
vectors.


.. literalinclude:: /development/custom-vectors/rsa-oaep-sha2/VerifyRSAOAEPSHA2.java

Download link: :download:`VerifyRSAOAEPSHA2.java
</development/custom-vectors/rsa-oaep-sha2/VerifyRSAOAEPSHA2.java>`

Using the Verifier
------------------

Download and install the `Java 8 SDK`_. Initial verification was performed
using ``jdk-8u77-macosx-x64.dmg``.

Download the latest `Bouncy Castle`_ JAR.  Initial verification was performed
using ``bcprov-jdk15on-154.jar``.

Set the ``-classpath`` to include the Bouncy Castle jar and the path to
``VerifyRSAOAEPSHA2.java`` and compile the program.

.. code-block:: console

    $ javac -classpath ~/Downloads/bcprov-jdk15on-154.jar:./ VerifyRSAOAEPSHA2.java

Finally, run the program with the path to the SHA-2 vectors:

.. code-block:: console

    $ java -classpath ~/Downloads/bcprov-jdk15on-154.jar:./ VerifyRSAOAEPSHA2

.. _`Bouncy Castle`: https://www.bouncycastle.org/
.. _`Java 8 SDK`: https://www.oracle.com/technetwork/java/javase/downloads/index.html
  "   lY>e8n2ژoh      disabled
  7   355_I|Mjq؂ <oaY>e8Aq.
bѿ c    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
     Bƾ ?    
:mod:`nis` --- Interface to Sun's NIS (Yellow Pages)
====================================================

.. module:: nis
   :platform: Unix
   :synopsis: Interface to Sun's NIS (Yellow Pages) library.
.. moduleauthor:: Fred Gansevles <Fred.Gansevles@cs.utwente.nl>
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>


The :mod:`nis` module gives a thin wrapper around the NIS library, useful for
central administration of several hosts.

Because NIS exists only on Unix systems, this module is only available for Unix.

The :mod:`nis` module defines the following functions:


.. function:: match(key, mapname[, domain=default_domain])

   Return the match for *key* in map *mapname*, or raise an error
   (:exc:`nis.error`) if there is none. Both should be strings, *key* is 8-bit
   clean. Return value is an arbitrary array of bytes (may contain ``NULL`` and
   other joys).

   Note that *mapname* is first checked if it is an alias to another name.

   .. versionchanged:: 2.5
      The *domain* argument allows to override the NIS domain used for the lookup. If
      unspecified, lookup is in the default NIS domain.


.. function:: cat(mapname[, domain=default_domain])

   Return a dictionary mapping *key* to *value* such that ``match(key,
   mapname)==value``. Note that both keys and values of the dictionary are
   arbitrary arrays of bytes.

   Note that *mapname* is first checked if it is an alias to another name.

   .. versionchanged:: 2.5
      The *domain* argument allows to override the NIS domain used for the lookup. If
      unspecified, lookup is in the default NIS domain.


.. function:: maps(