<PAGE>
                                                                     Exhibit 10b

                    SUBSCRIPTION AND STOCK PURCHASE AGREEMENT


         AGREEMENT dated July 15, 1998 by and between Astrex, Inc., a Delaware
corporation (the "Company) with principal offices located at 205 Express Steet,
Plainview, New York 11803, and John C. Loring and Elizabeth S. Loring,
individuals residing at 700 Irving Park Road, Chicago, Illinois (the
"Purchasers").

                               W I T N E S S E T H
                               -------------------

                  WHEREAS, the Company desires to sell and the Purchasers desire
to purchase 1,200,000 (one million two hundred thousand) shares of Common Stock,
par value $.01 per share, of the Company (collectively, the "Purchased Shares")
pursuant to the terms and conditions set forth below.
                  NOW, THEREFORE, in consideration of the mutual covenants and
conditions set forth herein, and intending to be legally bound hereby, the
parties agree as follows:

                  1. PURCHASE. The Purchasers hereby purchase from the Company,
and the Company hereby sells to the Purchasers, the Purchased Shares for a per
share purchase price of $.25 (twenty-five cents), or a total of $300,000, as
follows:
         (a)  John C. Loring as beneficiary of a SEP IRA in his name
              at McDonald & Company: $239,800;

         (b)  Elizabeth S. Loring as beneficiary of an IRA in her name at
              McDonald & Company: $48,700;

         (c)  John C. Loring as Custodian for Michael Loring under
              the Illinois UNIF Transfers to Minors Act at
              Everen Securities: $10,300; and

         (d)  John C. Loring & Elizabeth S. Loring as JTWRS
              at Everen Securities: $1,200.


Astrex/Enigma Agreement                                               Page 19

<PAGE>

Simultaneously herewith, and in full consideration for the Purchased Shares, the
Purchasers hereby tender to the Company a certified check or wire transfer in
the amount of $300,000. The Company shall deliver to the Purchasers as promptly
as practical one or more certificates as reasonably requested by the Purchasers
representing the Purchased Shares.

                  2. REPRESENTATIONS AND WARRANTIES OF THE COMPANY. The Company
represents and warrants to, and covenants and agrees with, the Purchasers as
follows:

                           (a) The Company is duly organized, validly existing
and in good standing under the laws of the State of Delaware with full power and
authority to own, lease, license and use its properties and assets and to carry
out the business in which it is engaged.

                           (b) Each Purchased Share, upon issuance and sale
herewith, is and will be validly authorized, validly issued, fully paid and
nonassessable, and has not and will not have been issued and is not and will not
be owned or held in violation of any rights of first refusal, preemptive rights
or the like of stockholders.

                           (c) The Company has all requisite power and authority
to (i) execute, deliver and perform its obligations under this Agreement and
(ii) to issue and sell the Purchased Shares. All necessary corporate proceedings
of the Company have been duly taken to authorize the execution, delivery, and
performance of this Agreement. This Agreement has been duly authorized by the
Company and, when executed and delivered by the Company, will constitute legal,
valid and binding obligations of the Company, enforceable against the Company in
accordance with their respective terms.

                           (d) No consent, authorization, approval, order,
license, certificate or permit of or from, or declaration or filing with, any
federal, state, local, foreign or other governmental authority, or any court or
any other tribunal, and no consent of any party to any contract, agreement,
instrument, lease, license, arrangement or understanding to which the Company is
a party or to which any of its properties or assets are subject, is required by
the Company for the execution, delivery or performance by the Company of this
Agreement the issuance and sale of the Purchased Shares.

Astrex/Enigma Agreement                                               Page 20

<PAGE>

                  3. REPRESENTATIONS AND WARRANTIES OF THE PURCHASERS. The
Purchasers hereby jointly and severally represent and warrant to, and covenant
and agree with, the Company as follows:

                           (a) The Purchasers are "Accredited Investors" as that
term is defined in Rule 501 (a) of Regulation D promulgated under the Securities
Act of 1933, as amended (the "Act").

                           (b) The Purchasers are duly authorized to execute
this Agreement and this Agreement constitutes the legal, valid and binding
obligation of the Purchasers enforceable against the Purchasers in accordance
with its terms.

                           (c) The Purchasers have been advised by the Company
that none of the Purchased Shares have been registered
under the Act, that the Purchased Shares will be issued on the basis of the
statutory exemption provided by Section 4(2) of the Act or Regulation D
promulgated thereunder, or both, relating to transactions by an issuer not
involving any public offering and under similar exemptions under certain state
securities laws, that this transaction has not been reviewed by, passed on or
submitted to any federal or state agency or self-regulatory organization where
an exemption is being relied upon, and that the Company's reliance thereon is
based in part upon the representations made by the Purchasers in this Agreement.
The Purchasers acknowledge that the Purchasers have been informed by the Company
of, or are otherwise familiar with, the nature of the limitations imposed by the
Act and the rules and regulations thereunder on the transfer of securities. The
Purchasers acknowledges that the certificate or certificates evidencing the
Purchased Shares shall bear the following or a substantially similar legend and
other legends as may be required by state blue sky laws:

                  "The securities represented by this Certificate have not been
                  registered under the Securities Act of 1933, as amended, or
                  any state securities laws and may not be sold, transferred,
                  offered for sale, pledged, hypothecated or otherwise disposed
                  of without registration under the Securities Act of 1933, as
                  amended, and under applicable state securities laws, unless
                  the Issuer shall have received an opinion of counsel
                  reasonably satisfactory to the Issuer that the securities
                  represented by this certificate may be legally sold or
                  distributed pursuant to exemptions from registration under the
                  Securities Act of 1933, as amended, and without registration
                  under then applicable state and Federal laws."

Astrex/Enigma Agreement                                               Page 21

<PAGE>
                           (d) The Purchasers are acquiring the Purchased Shares
for the Purchasers' own accounts for investment and not with a view to the
distribution thereof and have no present intention of publicly distributing the
Purchased Shares. The Purchasers' financial conditions are such that the
Purchasers are able to bear the risk of holding the Purchased Shares for an
indefinite period of time and to suffer the risk of loss of their entire
investment.

                           (e) The Purchasers are familiar with the business and
affairs of the Company. The Purchasers have been given the opportunity to
investigate and ask questions regarding the Company, the Company's business,
operations, strategy and financial results and have formed their own opinion
regarding its investment in the Purchased Shares.

                  4.  Company Option.
                      --------------
                           The Company shall have the right and option to
repurchase from the Purchasers all (and not less than all) of the
Purchased Shares during the Option Term for the Option Price if and only if
either:
                           (a) The Company shall not grant rights to all or
                               substantially all of its stockholders pursuant to
                               a Qualified Rights Offering prior to November 1;
                               1998 or
                           (b) The Company does grant rights to all or
                               substantially all of its stockholders pursuant to
                               a Qualified Rights Offering prior to November 1,
                               1998 and the Purchasers, in the aggregate,
                               acquire more than $31,000 worth of Common Stock
                               in such offering by right (i.e., pursuant to the
                               terms of such offering) if such offering provides
                               for the purchase by right of approximately 1.35
                               shares for each share held which limit shall be
                               adjusted pro rata to the extent the offering
                               provides for the purchase by right of more than
                               approximately 1.35 shares for each share held;
                               provided, however, that any shares of Common
                               Stock acquired by the Purchaser in such offering
                               that are available for purchase because they are
                               not subscribed for by other rights holders (i.e.,
                               an unsubscribed allotment) shall be exempt from
                               and not count towards this limit.

Astrex/Enigma Agreement                                               Page 22

<PAGE>

                  "Option Term" means February 1, 1999 through the end of 
business on February 28 1999.

                  "Option Price" means $318,000.

                  "Qualified Rights Offering" means a rights offering to be made
by the Company to all or substantially all of its stockholders whereby the
stockholders will be granted rights to purchase shares of Common Stock on
substantially the same terms as Purchaser is purchasing the Purchased Shares
hereunder, namely, (i) the purchase price for each new share of Common Stock in
the rights offering will be approximately $.25, and (ii) each stockholder will
be granted the right to purchase approximately 1.35 or more new shares of Common
Stock for every one share of Common Stock that the stockholder shall own as of
the offering's record date; (provided, however, that while the shares of Common
Stock to be sold in a rights offering will probably be covered by an effective
registration statement under the Act, it is acknowledged that the Purchased
Shares are being sold hereunder on an unregistered basis).

                  5.  Piggyback Registration Right.
                      ----------------------------
                           If the Company shall from time to time file one or
more registration statements under the Act with the Securities and Exchange,
then the Company shall grant the Purchaser the right and opportunity to include
any or all of his Purchased Shares in any such registration statement for public
sale, unless the Company in its reasonable discretion determines (i) that the
inclusion of the Purchased Shares in the registration statement will
substantially increase the costs of the registration and offering, (ii) that the
inclusion of the Purchased Shares in the registration statement will interfere
with the securities offering contemplated by the registration statement or (iii)
the registration statement is not an appropriate form to register the Purchased
Shares (e.g., an S-8 would generally not be deemed an appropriate form insofar
as it applies to employee compensation plans).

                  6.       Miscellaneous.
                           -------------
                           (a) This Agreement sets forth the entire
understanding of the parties with respect to the subject matter hereof,
supersedes all existing agreements among them concerning such subject matter,
and may be modified or terminated only by a written instrument duly executed by
the parties hereto.

Astrex/Enigma Agreement                                               Page 23

<PAGE>

                           (b) Except as otherwise specifically provided herein,
any notice or other communication required or permitted to be given hereunder
shall be in writing and shall be mailed by certified mail, return receipt
requested, or by Federal Express, Express Mail or similar overnight delivery or
courier service or delivered (in person or by telecopy, telex or similar
telecommunications equipment) against receipt to the party to whom it is to be
given to the addresses set forth above.

                           (c) This Agreement shall be binding upon and inure to
the benefit of the parties hereto, their personal representatives, heirs,
successors and assigns.

                           (d) The headings in this Agreement are solely for
convenience of reference and shall be given no effect in the construction or
interpretation of this Agreement.

                           (e) This Agreement may be executed in any number of
counterparts, each of which shall be deemed an original, but all of which
together shall constitute one and the same instrument.

                           (f) This Agreement shall be governed by and construed
in accordance with the laws of the State of New York, without giving effect to
principles governing conflicts of law. Any action arising out of, resulting from
or in any way relating to this Agreement or any alleged breach hereof or default
hereunder shall be brought in the state courts in the State of New York in
Nassau County or the United States District Court for the Eastern District of
New York, and the parties hereto agree that such courts shall have the sole and
exclusive jurisdiction over any dispute or controversy related to this
Agreement.
                                              ASTREX, INC.

                                               By: /s/ Michael McGuire
                                                  ----------------------------
                                                   Michael McGuire, President



                                               PURCHASERS

                                               /s/ John C. Loring
                                               -------------------------------
                                               John C. Loring


                                               /s/ Elizabeth S. Loring
                                               -------------------------------
                                               Elizabeth S. Loring


Astrex/Enigma Agreement                                          Page 24