|
root / base / usr / src / lib / libmd
libmd Plain Text 777 lines 22.3 KB
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2013 Saso Kiselkov. All rights reserved.
#

include		$(SRC)/lib/Makefile.lib

# Hammerhead: SPARC CAPDIR removed - amd64 only

SUBDIRS = $(MACH64)

HDRS =		md4.h md5.h sha1.h sha2.h skein.h
HDRDIR =	common

all :		TARGET= all
clean :	TARGET= clean
clobber :	TARGET= clobber
install :	TARGET= install

.KEEP_STATE:

.PARALLEL:	$(SUBDIRS)

all clean clobber install: \
		$(CAPDIR) .WAIT $(SUBDIRS)

install_h:	$(ROOTHDRS)

check:		$(CHECKHDRS)

$(CAPDIR) \
$(SUBDIRS):	FRC
		@cd $@; pwd; $(MAKE) $(TARGET)

FRC:

include		$(SRC)/lib/Makefile.targ
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2013 Saso Kiselkov. All rights reserved.
# Copyright (c) 2018, Joyent, Inc.
#

LIBS =		$(DYNLIB)
SRCS =		$(COMDIR)/edonr/edonr.c \
		$(COMDIR)/md4/md4.c \
		$(COMDIR)/md5/md5.c \
		$(COMDIR)/sha1/sha1.c \
		$(COMDIR)/sha2/sha2.c \
		$(COMDIR)/skein/skein.c \
		$(COMDIR)/skein/skein_block.c \
		$(COMDIR)/skein/skein_iv.c

COMDIR =	$(SRC)/common/crypto
SRCDIR =	../common
MAPFILEDIR =	$(SRCDIR)

CFLAGS +=	$(CCVERBOSE)
# Hammerhead: Add uts/common for sys/sha1_consts.h and sys/sha2_consts.h
CPPFLAGS +=	-I$(SRCDIR) -I$(SRC)/uts/common
LDLIBS +=	-lc
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2013 Saso Kiselkov. All rights reserved.
# Copyright 2019 Peter Tribble.
#

COMDIR =	$(SRC)/common/crypto

pics/%.o: $(COMDIR)/edonr/%.c
		$(COMPILE.c) -I$(COMDIR)/edonr -o $@ $<
		$(POST_PROCESS_O)

pics/%.o: $(COMDIR)/md4/%.c
		$(COMPILE.c) -I$(COMDIR)/md4 -o $@ $<
		$(POST_PROCESS_O)

pics/%.o: $(COMDIR)/md5/%.c
		$(COMPILE.c) -I$(COMDIR)/md5 -o $@ $<
		$(POST_PROCESS_O)

pics/%.o: $(COMDIR)/sha1/%.c
		$(COMPILE.c) -I$(COMDIR)/sha1 -o $@ $<
		$(POST_PROCESS_O)

pics/sha1_asm.o: $(COMDIR)/sha1/sparc/$(PLATFORM)/sha1_asm.s
		$(COMPILE.s) -o pics/sha1_asm.o \
		$(COMDIR)/sha1/sparc/$(PLATFORM)/sha1_asm.s
		$(POST_PROCESS_S_O)

pics/%.o: $(COMDIR)/sha2/%.c
		$(COMPILE.c) -I$(COMDIR)/sha2 -o $@ $<
		$(POST_PROCESS_O)

pics/%.o: $(COMDIR)/skein/%.c
		$(COMPILE.c) -I$(COMDIR)/skein -o $@ $<
		$(POST_PROCESS_O)

include		$(SRC)/lib/Makefile.targ
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2013 Saso Kiselkov. All rights reserved.
#

LIBRARY =	libmd.a
VERS =		.1

OBJECTS =	edonr.o md4.o md5.o sha1.o sha2.o \
		skein.o skein_block.o skein_iv.o

include		$(SRC)/lib/Makefile.lib
include		$(SRC)/lib/Makefile.rootfs
include		$(SRC)/lib/Makefile.lib.64
include		../Makefile.com

# Hammerhead: Disable symbol capabilities (requires illumos ld -z symbolcap)
# Using generic x86_64 implementations only - no SHA-NI hardware acceleration
# TODO: Consider adding GNU ifunc support for CPU feature dispatch
#CAPFILES =	pics/sha1-ni.o \
#		pics/sha256-ni.o

EXTPICS =	pics/md5_amd64.o \
		pics/sha512-x86_64.o \
		pics/sha256-x86_64.o \
		pics/sha1-x86_64.o

CLEANFILES +=	$(EXTPICS) \
		$(EXTPICS:pics/%.o=%.S) \
		$(EXTPICS:pics/%.o=%.s)

pics/sha1-ni.o.objcap		: CAPFILE = capabilities/sha.cap
pics/sha256-ni.o.objcap		: CAPFILE = capabilities/sha.cap

# This prevents <sys/asm_linkage.h> from including C source:
AS_CPPFLAGS += -D_ASM

.KEPP_STATE:

all:		$(LIBS)

install:	all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTCOMPATLINKS64)

pics/%.o: %.s
		$(COMPILE.s) -o $@ ${@F:.o=.s}
		$(POST_PROCESS_O)

pics/%.o: %.S
		$(COMPILE.s) -o $@ ${@F:.o=.S}
		$(POST_PROCESS_O)

pics/%.o: $(SRC)/common/crypto/sha1/amd64/%.S
		$(COMPILE.s) -o $@ $<
		$(POST_PROCESS_O)

pics/%.o: $(SRC)/common/crypto/sha2/amd64/%.S
		$(COMPILE.s) -o $@ $<
		$(POST_PROCESS_O)

pics/%.o.objcap: pics/%.o
		$(LD) -r -o $@ -Wl,-M$(CAPFILE) $(BREDUCE) $<
		$(POST_PROCESS_O)

pics/%.o.symcap: pics/%.o.objcap
		$(LD) -r -o $@ -z symbolcap $<

md5_amd64.S: $(COMDIR)/md5/amd64/md5_amd64.pl
		$(PERL) $? $@

sha1-x86_64.S: $(COMDIR)/sha1/amd64/sha1-x86_64.pl
		$(PERL) $? $@

sha512-x86_64.S: $(COMDIR)/sha2/amd64/sha512-x86_64.pl
		$(PERL) $? $@

sha256-x86_64.S: $(COMDIR)/sha2/amd64/sha512-x86_64.pl
		$(PERL) $? $@

include		../Makefile.targ
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright 2018 Joyent, Inc.
#

$mapfile_version 2

CAPABILITY shani {
	MACHINE = i86pc;
	HW_1 = SSE2 SSSE3 SSE4.1;
	#
	# To avoid a chicken and egg problem with ld, we refer to the
	# SHA hardware cap value by its numeric value rather than the name.
	# This allows us to deal with the fact that we're almost
	# certainly building this on a system before the capability was
	# known.
	#
	HW_2 = 0x100000;
};
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#

include		$(SRC)/lib/Makefile.lib

# Each target directory is responsible for making a symbol capabilities object.
# Hammerhead: amd64 only - no SPARC subdirs
SUBDIRS =

all :		TARGET= all
clean :	TARGET= clean
clobber :	TARGET= clobber
install :	TARGET= install

.KEEP_STATE:

.PARALLEL:	$(SUBDIRS)

all clean clobber install: \
		$(SUBDIRS)


$(SUBDIRS):	FRC
		@cd $@; pwd; $(MAKE) $(TARGET)

FRC:
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#

#include		../../../Makefile.com

MAPFILE-CAP =	../common/mapfile-cap
MAPOPT-CAP =	$(MAPFILE-CAP:%=-Wl,-M%)

OBJCAP =	pics/objcap.o
SYMCAP =	pics/symcap.o

CLOBBERFILES +=	$(OBJCAP) $(SYMCAP)
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#

#
# libmd provides two families of optimized functions for SPARC platforms,
# one for sun4u, and one for sun4v.  Previous implementations provided
# these families as libmd_psr.so.1 libraries, triggered by tagging libmd.so.1
# as an auxiliary filter.  These psr filtees were installed under
# /usr/platform/sun4u/lib, and numerous symlinks were established to provide
# the necessary $PLATFORM names, ie:
#
#  /usr/platform/SUNW,Ultra-2/lib/libmd_psr.so.1 -> ../../../sun4u
#  /usr/platform/SUNW,Ultra-4/lib/libmd_psr.so.1 -> ../../../sun4u
#  ....
#
# and:
#
#  /usr/platform/SUNW,Netra-CP3060/lib/libmd_psr.so.1 -> ../../sun4v
#  /usr/platform/SUNW,Netra-CP3260/lib/libmd_psr.so.1 -> ../../sun4v/
#  ....
#
# The objects that made up these filtees are now combined into one relocatable
# object, pics/objcap.o, using ../common/mapfile-cap.  This mapfile identifies
# the machine hardware name, together with establishing the global symbols that
# should be exported to define each family.
#
# This object capabilities relocatable object is then translated into a symbol
# capabilities relocatable object, pics/symcap.o.
#
# The sun4u and sun4v families of symbol capabilities object are eventually
# included in the final build of libmd.so.1.

$(SYMCAP):	$(OBJCAP)
$(OBJCAP):	$(PICS)
$(PICS):	pics

# Combine all pic objects into one relocatable object.  Assign any capabilities
# to this object, and define the interface.

pics/objcap.o:	$(PICS) $(MAPFILE-CAP)
		$(LD) -r -o $@ $(MAPOPT-CAP) $(BREDUCE) $(PICS)

# Convert the combined object capabilities object into a symbol capabilities
# object.

pics/symcap.o:	$(OBJCAP)
		$(LD) -r -o $@ -z symbolcap $(OBJCAP)

include		../../../Makefile.targ
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2013 Saso Kiselkov. All rights reserved.
# Copyright (c) 2018, Joyent, Inc.
#

#
# MAPFILE HEADER START
#
# WARNING:  STOP NOW.  DO NOT MODIFY THIS FILE.
# Object versioning must comply with the rules detailed in
#
#	usr/src/lib/README.mapfiles
#
# You should not be making modifications here until you've read the most current
# copy of that file. If you need help, contact a gatekeeper for guidance.
#
# MAPFILE HEADER END
#

$mapfile_version 2

# Note:
#
#	SHA256Update, SHA384Update, and SHA512Update are all
#	weak aliases for SHA2Update.
#
#	SHA256Final, SHA384Final, and SHA512Final are all
#	weak aliases for SHA2Final
#
# We use NODYNSORT to keep the weak aliases out of the .SUNW_dymsymsort
# ELF section. As a result, ld will put the two main symbols in.
#

SYMBOL_VERSION ILLUMOS_0.1 {
    global:
	Skein1024_Final;
	Skein1024_Final_Pad;
	Skein1024_Init;
	Skein1024_InitExt;
	Skein1024_Output;
	Skein1024_Update;
	Skein_256_Final;
	Skein_256_Final_Pad;
	Skein_256_Init;
	Skein_256_InitExt;
	Skein_256_Output;
	Skein_256_Update;
	Skein_512_Final;
	Skein_512_Final_Pad;
	Skein_512_Init;
	Skein_512_InitExt;
	Skein_512_Output;
	Skein_512_Update;
	EdonRFinal;
	EdonRHash;
	EdonRInit;
	EdonRUpdate;
} SUNW_1.1;

SYMBOL_VERSION SUNW_1.1 {
    global:
	MD4Final;
	MD4Init;
	MD4Update;
	md5_calc;
	MD5Final	{ FLAGS = NODIRECT; };	# Addr interpose from testsuite
	MD5Init	{ FLAGS = NODIRECT; };	# Addr interpose from testsuite
	MD5Update	{ FLAGS = NODIRECT; };	# Addr interpose from testsuite
	SHA1Final;
	SHA1Init;
	SHA1Update;
	SHA256Final	{ FLAGS = NODYNSORT; };
	SHA256Init;
	SHA256Update	{ FLAGS = NODYNSORT; };
	SHA2Final;
	SHA2Init;
	SHA2Update;
	SHA384Final	{ FLAGS = NODYNSORT; };
	SHA384Init;
	SHA384Update	{ FLAGS = NODYNSORT; };
	SHA512Final	{ FLAGS = NODYNSORT; };
	SHA512Init;
	SHA512Update	{ FLAGS = NODYNSORT; };
};

SYMBOL_VERSION ILLUMOSprivate {
    global:
$if _ELF64 && _x86
	#
	# We use hardware capabilities to define multiple versions of
	# the block processing functions for some of the SHA functions.
	# Unfortunately, that requires these to be global symbols, even
	# though we don't want them to be. As such, they remain in a
	# private version and hopefully some day will be removed. These
	# symbols are not exposed in any meaningful way in a header file
	# so no application should actually end up requiring this
	# section.
	#
	sha1_block_data_order;
	SHA256TransformBlocks;
$endif
    local:
	*;
};
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */

/*
 * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

#ifndef _MD4_H
#define	_MD4_H

#include <sys/md4.h>

#endif	/* _MD4_H */
/*
 * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

#ifndef _MD5_H
#define	_MD5_H

/*
 * MD5.H - header file for MD5C.C
 */

/*
 * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
 * rights reserved.
 *
 * License to copy and use this software is granted provided that it
 * is identified as the "RSA Data Security, Inc. MD5 Message-Digest
 * Algorithm" in all material mentioning or referencing this software
 * or this function.
 *
 * License is also granted to make and use derivative works provided
 * that such works are identified as "derived from the RSA Data
 * Security, Inc. MD5 Message-Digest Algorithm" in all material
 * mentioning or referencing the derived work.
 *
 * RSA Data Security, Inc. makes no representations concerning either
 * the merchantability of this software or the suitability of this
 * software for any particular purpose. It is provided "as is"
 * without express or implied warranty of any kind.
 *
 * These notices must be retained in any copies of any part of this
 * documentation and/or software.
 */

#include <sys/md5.h>

#ifdef __cplusplus
extern "C" {
#endif

void md5_calc(void *, const void*, unsigned int);

#ifdef __cplusplus
}
#endif

#endif	/* _MD5_H */
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */

/*
 * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

#ifndef _SHA1_H
#define	_SHA1_H

#include <sys/sha1.h>

#endif	/* _SHA1_H */
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */

/*
 * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

#ifndef _SHA2_H
#define	_SHA2_H

#include <sys/sha2.h>

#endif	/* _SHA2_H */
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */

/*
 * Copyright 2013 Saso Kiselkov.  All rights reserved.
 */

#ifndef _SKEIN_H
#define	_SKEIN_H

#include <sys/skein.h>

#endif	/* _SKEIN_H */
#!/bin/sh
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# Copyright 2013 Saso Kiselkov.  All rights reserved.

find_files "s.*" usr/src/common/crypto/edonr
find_files "s.*" usr/src/common/crypto/md4
find_files "s.*" usr/src/common/crypto/md5
find_files "s.*" usr/src/common/crypto/sha1
find_files "s.*" usr/src/common/crypto/sha2
find_files "s.*" usr/src/common/crypto/skein