[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CRYPTO DATA warning sign



I posted this to alt.hackers last Thursday, and I just joined cypherpunks
yesterday, so I don't know whether someone copied it to the list in the
intervening days.  If so, sorry for the duplication.  If not...

This is a warning sign in the style of the diamond-shaped ones that the
Department of Transportation requires on the back of vehicles carrying
hazardous loads.  It will look pretty butch on your read bumper.  I suggest
printing it onto sticker paper and then overspraying with clear acrylic
or polyurethane for weatherproofing.
---
Jef

%! dot_crypto.ps - draw a DOT cryptographic data warning symbol
%
% Copyright (C) 1989, 1993 by Jef Poskanzer <[email protected]>.
%
% Permission to use, copy, modify, and distribute this software and its
% documentation for any purpose and without fee is hereby granted, provided
% that the above copyright notice appear in all copies and that both that
% copyright notice and this permission notice appear in supporting
% documentation.  This software is provided "as is" without express or
% implied warranty.

/in  { 72 mul }  def
/black  { 0 setgray }  def
/white  { 1 setgray }  def

/showcenter {			% str --
    dup stringwidth pop
    2 div neg  0  rmoveto
    show
} def


% Disk - actual size, centered at 0,0.

/disk_lw  0.03 in  def			% line width
/disk_width  3.5 in  def
/disk_height  3.66 in  def
/disk_shadow  0.05 in  def		% Drop-shadow offset.
/disk_cutoff  0.2 in  def		% corner cutoff size
/disk_hole_width  0.18 in  def
/disk_hole_height  0.15 in  def
/disk_hole_xmargin  0.1 in  def		% x distange between right edges
/disk_hole_ymargin  0.26 in  def	% y distange between bottom edges

/disk_detail_radii  0.1 in  def		% radius of corners on details

/disk_label_width  2.80 in  def
/disk_label_height  2.16 in  def

/disk_labelline_margin  0.1 in  def
/disk_labelline_width  disk_label_width disk_labelline_margin 2 mul sub  def
/disk_labelline_yspacing  disk_label_height 5 div  def

/disk_labeltext_size  disk_labelline_yspacing 0.7 mul  def
/disk_labeltext_yoffset  disk_labelline_yspacing 0.1 mul  def

/disk_detail_leftmargin  disk_width disk_label_width sub 2 div  def

/disk_slidearea_width  2.38 in  def
/disk_slidearea_height  1.26 in  def

/disk_slide_width  1.87 in  def

/disk_slidehole_width  0.47 in  def
/disk_slidehole_height  0.99 in  def
/disk_slidehole_xmargin  0.3 in  def	% x distance between right edges
/disk_slidehole_ymargin  0.175 in  def	% y distance between top edges

/disk_wo2  disk_width 2 div  def
/disk_ho2  disk_height 2 div  def

/disk_outline {
    newpath
	disk_wo2 neg  disk_ho2 neg  moveto
	0  disk_height  rlineto
	disk_width disk_cutoff sub  0  rlineto
	disk_cutoff  disk_cutoff neg  rlineto
	0  disk_height disk_cutoff sub neg  rlineto
    closepath
	disk_wo2 disk_hole_xmargin sub  disk_ho2 neg disk_hole_ymargin add
	    moveto
	0  disk_hole_height  rlineto
	disk_hole_width neg  0  rlineto
	0  disk_hole_height neg  rlineto
    closepath
	disk_wo2 neg disk_hole_xmargin add  disk_ho2 neg disk_hole_ymargin add
	    moveto
	disk_hole_width  0  rlineto
	0  disk_hole_height  rlineto
	disk_hole_width neg  0  rlineto
    closepath
} def

/disk {				% line1 line2 line3 line4 --
    % Save args.
    /disk_line4 exch def
    /disk_line3 exch def
    /disk_line2 exch def
    /disk_line1 exch def
    % First draw drop-shadow.
    black
    gsave
	disk_shadow neg  disk_shadow neg  translate
	disk_outline
	fill
    grestore
    % Fill with white.
    white
    disk_outline
    fill
    % Draw outline.
    disk_lw setlinewidth
    black
    disk_outline
    stroke
    % Label area.
    newpath
	disk_wo2 neg disk_detail_leftmargin add
	    disk_ho2 neg  moveto
	disk_wo2 neg disk_detail_leftmargin add disk_detail_radii add
	    disk_ho2 neg disk_label_height add disk_detail_radii sub
	    disk_detail_radii 180 90 arcn
	disk_wo2 disk_detail_leftmargin sub disk_detail_radii sub
	    disk_ho2 neg disk_label_height add disk_detail_radii sub
	    disk_detail_radii 90 0 arcn
	disk_wo2 neg disk_detail_leftmargin add disk_label_width add
	    disk_ho2 neg  lineto
    stroke
    % Label lines and text.
    gsave
	0 setlinewidth
	disk_wo2 neg disk_detail_leftmargin add disk_label_width add
	    disk_ho2 neg  translate
	180 rotate
	/Times-Roman findfont disk_labeltext_size scalefont setfont
	newpath
	    disk_labelline_margin  disk_labelline_yspacing -1 mul  moveto
	    disk_labelline_width  0  rlineto
	stroke
	disk_labelline_margin
	    disk_labelline_yspacing -1 mul disk_labeltext_yoffset add  moveto
	disk_line1 show
	newpath
	    disk_labelline_margin  disk_labelline_yspacing -2 mul  moveto
	    disk_labelline_width  0  rlineto
	stroke
	disk_labelline_margin
	    disk_labelline_yspacing -2 mul disk_labeltext_yoffset add  moveto
	disk_line2 show
	newpath
	    disk_labelline_margin  disk_labelline_yspacing -3 mul  moveto
	    disk_labelline_width  0  rlineto
	stroke
	disk_labelline_margin
	    disk_labelline_yspacing -3 mul disk_labeltext_yoffset add  moveto
	disk_line3 show
	newpath
	    disk_labelline_margin  disk_labelline_yspacing -4 mul  moveto
	    disk_labelline_width  0  rlineto
	stroke
	disk_labelline_margin
	    disk_labelline_yspacing -4 mul disk_labeltext_yoffset add  moveto
	disk_line4 show
    grestore
    % Slide area.
    newpath
	disk_wo2 neg disk_detail_leftmargin add
	    disk_ho2  moveto
	disk_wo2 neg disk_detail_leftmargin add disk_detail_radii add
	    disk_ho2 disk_slidearea_height sub disk_detail_radii add
	    disk_detail_radii 180 270 arc
	disk_wo2 neg disk_detail_leftmargin add disk_slidearea_width add disk_detail_radii sub
	    disk_ho2 disk_slidearea_height sub disk_detail_radii add
	    disk_detail_radii 270 0 arc
	disk_wo2 neg disk_detail_leftmargin add disk_slidearea_width add
	    disk_ho2  lineto
    stroke
    % Slide.
    newpath
	disk_wo2 neg disk_detail_leftmargin add disk_slidearea_width add disk_slide_width sub
	    disk_ho2  moveto
	disk_wo2 neg disk_detail_leftmargin add disk_slidearea_width add disk_slide_width sub disk_detail_radii add
	    disk_ho2 disk_slidearea_height sub disk_detail_radii add
	    disk_detail_radii 180 270 arc
    stroke
    % Slide hole.
    newpath
	disk_wo2 neg disk_detail_leftmargin add disk_slidearea_width add disk_slidehole_xmargin sub
	    disk_ho2 disk_slidehole_ymargin sub  moveto
	0  disk_slidehole_height neg  rlineto
	disk_slidehole_width neg  0  rlineto
	0  disk_slidehole_height  rlineto
    closepath  stroke
} def


% DOT diamond - size 1, centered at 0,0.

/DOT_lw  0.01  def			% line width
/DOT_inset  0.06  def			% inset of inner border

/DOT_bits_xspacing  0.012  def
/DOT_bits_yspacing  0.020  def
/DOT_bits_size  0.75  def
/DOT_bits_xsize  DOT_bits_xspacing DOT_bits_size mul  def
/DOT_bits_ysize  DOT_bits_yspacing DOT_bits_size mul  def
/DOT_bits_nx  1 DOT_bits_xspacing div  def
/DOT_bits_ny  1 DOT_bits_yspacing div  def
/DOT_bits_xso2  DOT_bits_xsize 2 div  def
/DOT_bits_yso2  DOT_bits_ysize 2 div  def

/DOT_diskoffset  0.19  def		% y-position of disk
/DOT_diskscale  0.28 3.5 in div  def	% scale of disk
/DOT_fontsize  0.09  def		% size of lettering
/DOT_wordoffset  -0.06  def		% y-position of "CRYPTO DATA"
/DOT_numoffset  -0.34  def		% y-position of "10"

/DOT_inner_outline {
    newpath
	-0.5 DOT_inset add  0  moveto
	0  0.5 DOT_inset sub  lineto
	0.5 DOT_inset sub  0  lineto
	0  -0.5 DOT_inset add  lineto
    closepath
} def

/DOT_bits_0 {
    gsave
	DOT_bits_xso2 DOT_bits_yso2 scale
	newpath
	    0 0 1 0 360 arc
	stroke
    grestore
}def

/DOT_bits_1 {
    newpath
	0  DOT_bits_yso2 neg  moveto
	0  DOT_bits_ysize  rlineto
    stroke
}def

/DOT_bits {
    0 setlinewidth
    gsave
	DOT_bits_nx DOT_bits_xspacing mul 2 div neg
	    DOT_bits_ny DOT_bits_yspacing mul 2 div neg  translate
	0 1 DOT_bits_ny {
	    gsave
		0  exch DOT_bits_yspacing mul  translate
		0 1 DOT_bits_nx {
		    gsave
			DOT_bits_xspacing mul  0  translate
			rand 2147483648 div 0.5 lt {
			    DOT_bits_0
			} {
			    DOT_bits_1
			} ifelse
		    grestore
		} for
	    grestore
	} for
    grestore
} def

/DOT {
    % Outer border.
    DOT_lw setlinewidth
    black
    newpath
	-0.5 0 moveto
	0 0.5 lineto
	0.5 0 lineto
	0 -0.5 lineto
    closepath  stroke
    % Fill inner area with 1's and 0's.
    gsave
	DOT_inner_outline
	clip
	DOT_bits
    grestore
    % Inner border.
    DOT_inner_outline
    stroke
    % Disk.
    gsave
	0  DOT_diskoffset  translate
	DOT_diskscale dup scale
	45 rotate
	black
	(PGP public key) (1024 bits) () () disk
    grestore
    % "CRYPTO DATA".
    /Helvetica-Bold findfont DOT_fontsize scalefont setfont
    0 DOT_wordoffset DOT_fontsize 0.4 mul sub moveto
    (CRYPTO DATA) showcenter
    % "10".
    0 DOT_numoffset DOT_fontsize 0.4 mul sub moveto
    (10) showcenter

} def


% Main code.

%/preview true def
/preview false def

preview {
    /m_x_offset 0.5 in def
    /m_y_offset 0.5 in def
    /m_x_count 1 def
    /m_y_count 1 def
    /m_size 7.5 in def
    /m_x_space 0 def
    /m_y_space 0 in def
    /m_angle 0 def
} {
    /m_x_offset 0.375 in def
    /m_y_offset 0.75 in def
    /m_x_count 3 def
    /m_y_count 3 def
    /m_size 2.25 in def
    /m_x_space 0.50 in def
    /m_y_space 0.75 in def
    /m_angle 45 def
    % Use manual feed.
    { statusdict begin /manualfeed true def end } stopped pop
} ifelse

gsave
    m_x_offset m_y_offset translate
    0 1 m_y_count 1 sub {
	gsave
	    0  exch m_size m_y_space add mul  translate
	    0 1 m_x_count 1 sub {
		gsave
		    m_size m_x_space add mul  0  translate
		    m_size 2 div dup translate
		    m_size dup scale
		    m_angle rotate
		    1 m_angle cos div dup scale
		    DOT
		grestore
	    } for
	grestore
    } for
grestore

showpage